@soft-stech/fleet
Version:
56 lines (55 loc) • 2.44 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IGitRepoRestrictionSchema = void 0;
// Generated by ts-to-zod
const zod_1 = require("zod");
const ObjectMeta_schema_1 = require("@soft-stech/apimachinery/apis/meta/v1/ObjectMeta.schema");
/**
* GitRepoRestriction is a resource that can optionally be used to restrict
* the options of GitRepos in the same namespace.
*/
exports.IGitRepoRestrictionSchema = zod_1.z.object({
/**
* AllowedClientSecretNames is a list of client secret names that GitRepos are allowed to use.
*/
allowedClientSecretNames: zod_1.z.array(zod_1.z.string()).optional(),
/**
* AllowedRepoPatterns is a list of regex patterns that restrict the
* valid values of the Repo field of a GitRepo.
*/
allowedRepoPatterns: zod_1.z.array(zod_1.z.string()).optional(),
/**
* AllowedServiceAccounts is a list of service accounts that GitRepos are allowed to use.
*/
allowedServiceAccounts: zod_1.z.array(zod_1.z.string()).optional(),
/**
* AllowedTargetNamespaces restricts TargetNamespace to the given
* namespaces. If AllowedTargetNamespaces is set, TargetNamespace must
* be set.
*/
allowedTargetNamespaces: zod_1.z.array(zod_1.z.string()).optional(),
/**
* APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion: zod_1.z.literal("fleet.cattle.io/v1alpha1"),
/**
* DefaultClientSecretName overrides the GitRepo's default client secret.
*/
defaultClientSecretName: zod_1.z.string().optional(),
/**
* DefaultServiceAccount overrides the GitRepo's default service account.
*/
defaultServiceAccount: zod_1.z.string().optional(),
/**
* Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind: zod_1.z.literal("GitRepoRestriction"),
metadata: ObjectMeta_schema_1.iObjectMetaSchema.optional()
});