UNPKG

@soft-stech/fleet

Version:
1,118 lines (1,117 loc) 179 kB
import { z } from "zod"; /** * Bundle contains the resources of an application and its deployment options. * It will be deployed as a Helm chart to target clusters. * * * When a GitRepo is scanned it will produce one or more bundles. Bundles are * a collection of resources that get deployed to one or more cluster(s). Bundle is the * fundamental deployment unit used in Fleet. The contents of a Bundle may be * Kubernetes manifests, Kustomize configuration, or Helm charts. Regardless * of the source the contents are dynamically rendered into a Helm chart by * the agent and installed into the downstream cluster as a Helm release. */ export declare const IBundleSchema: z.ZodObject<{ /** * 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: z.ZodLiteral<"fleet.cattle.io/v1alpha1">; /** * 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: z.ZodLiteral<"Bundle">; metadata: z.ZodOptional<z.ZodObject<{ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; creationTimestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>; deletionGracePeriodSeconds: z.ZodOptional<z.ZodNumber>; deletionTimestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>; finalizers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; generateName: z.ZodOptional<z.ZodString>; generation: z.ZodOptional<z.ZodNumber>; labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; /** * Diff can be used to ignore the modified state of objects which are amended at runtime. */ managedFields: z.ZodOptional<z.ZodArray<z.ZodObject<{ apiVersion: z.ZodOptional<z.ZodString>; fieldsType: z.ZodOptional<z.ZodString>; fieldsV1: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>; /** * Kind is the kind of the resource to match. */ manager: z.ZodOptional<z.ZodString>; operation: z.ZodOptional<z.ZodString>; subresource: z.ZodOptional<z.ZodString>; time: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { apiVersion?: string | undefined; fieldsType?: string | undefined; /** * Namespace is the namespace of the resource to match. */ fieldsV1?: {} | undefined; manager?: string | undefined; operation?: string | undefined; subresource?: string | undefined; /** * Operations remove a JSON path from the resource. */ time?: string | null | undefined; }, { apiVersion?: string | undefined; fieldsType?: string | undefined; fieldsV1?: {} | undefined; /** * Op is usually "remove" */ manager?: string | undefined; operation?: string | undefined; subresource?: string | undefined; time?: string | null | undefined; }>, "many">>; name: z.ZodOptional<z.ZodString>; namespace: z.ZodOptional<z.ZodString>; ownerReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{ apiVersion: z.ZodString; blockOwnerDeletion: z.ZodOptional<z.ZodBoolean>; controller: z.ZodOptional<z.ZodBoolean>; kind: z.ZodString; name: z.ZodString; uid: z.ZodString; }, "strip", z.ZodTypeAny, { apiVersion: string; kind: string; name: string; uid: string; blockOwnerDeletion?: boolean | undefined; controller?: boolean | undefined; }, { apiVersion: string; kind: string; name: string; uid: string; /** * ReleaseName sets a custom release name to deploy the chart as. If * not specified a release name will be generated by combining the * invoking GitRepo.name + GitRepo.path. * @maxLength 53 * @pattern ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ */ blockOwnerDeletion?: boolean | undefined; controller?: boolean | undefined; }>, "many">>; resourceVersion: z.ZodOptional<z.ZodString>; selfLink: z.ZodOptional<z.ZodString>; uid: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name?: string | undefined; uid?: string | undefined; resourceVersion?: string | undefined; selfLink?: string | undefined; /** * ValuesFrom loads the values from configmaps and secrets. */ annotations?: Record<string, string> | undefined; creationTimestamp?: string | null | undefined; deletionGracePeriodSeconds?: number | undefined; /** * The reference to a config map with release values. */ deletionTimestamp?: string | null | undefined; finalizers?: string[] | undefined; generateName?: string | undefined; generation?: number | undefined; labels?: Record<string, string> | undefined; managedFields?: { apiVersion?: string | undefined; fieldsType?: string | undefined; fieldsV1?: {} | undefined; manager?: string | undefined; operation?: string | undefined; subresource?: string | undefined; time?: string | null | undefined; }[] | undefined; namespace?: string | undefined; ownerReferences?: { apiVersion: string; kind: string; name: string; /** * Name of a resource in the same namespace as the referent. */ uid: string; blockOwnerDeletion?: boolean | undefined; controller?: boolean | undefined; }[] | undefined; }, { name?: string | undefined; uid?: string | undefined; resourceVersion?: string | undefined; selfLink?: string | undefined; annotations?: Record<string, string> | undefined; creationTimestamp?: string | null | undefined; deletionGracePeriodSeconds?: number | undefined; deletionTimestamp?: string | null | undefined; finalizers?: string[] | undefined; generateName?: string | undefined; generation?: number | undefined; labels?: Record<string, string> | undefined; managedFields?: { apiVersion?: string | undefined; fieldsType?: string | undefined; fieldsV1?: {} | undefined; manager?: string | undefined; operation?: string | undefined; /** * Conditions is a list of conditions to be ignored when monitoring the Bundle. */ subresource?: string | undefined; time?: string | null | undefined; }[] | undefined; namespace?: string | undefined; ownerReferences?: { apiVersion: string; kind: string; /** * KeepResources can be used to keep the deployed resources when removing the bundle */ name: string; uid: string; blockOwnerDeletion?: boolean | undefined; controller?: boolean | undefined; }[] | undefined; }>>; spec: z.ZodOptional<z.ZodObject<{ /** * ContentsID stores the contents id when deploying contents using an OCI registry. */ contentsId: z.ZodOptional<z.ZodString>; /** * CorrectDrift specifies how drift correction should work. */ correctDrift: z.ZodOptional<z.ZodObject<{ /** * Enabled correct drift if true. */ enabled: z.ZodOptional<z.ZodBoolean>; /** * Force helm rollback with --force option will be used if true. This will try to recreate all resources in the release. */ force: z.ZodOptional<z.ZodBoolean>; /** * KeepFailHistory keeps track of failed rollbacks in the helm history. */ keepFailHistory: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { enabled?: boolean | undefined; force?: boolean | undefined; keepFailHistory?: boolean | undefined; }, { enabled?: boolean | undefined; force?: boolean | undefined; keepFailHistory?: boolean | undefined; }>>; /** * DefaultNamespace is the namespace to use for resources that do not * specify a namespace. This field is not used to enforce or lock down * the deployment to a specific namespace. */ defaultNamespace: z.ZodOptional<z.ZodString>; /** * DeleteCRDResources deletes CRDs. Warning! this will also delete all your Custom Resources. */ deleteCRDResources: z.ZodOptional<z.ZodBoolean>; /** * DeleteNamespace can be used to delete the deployed namespace when removing the bundle */ deleteNamespace: z.ZodOptional<z.ZodBoolean>; /** * DependsOn refers to the bundles which must be ready before this bundle can be deployed. */ dependsOn: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * Name of the bundle. */ name: z.ZodOptional<z.ZodString>; /** * Selector matching bundle's labels. */ selector: z.ZodOptional<z.ZodObject<{ /** * matchExpressions is a list of label selector requirements. The requirements are ANDed. */ matchExpressions: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * key is the label key that the selector applies to. */ key: z.ZodString; /** * operator represents a key's relationship to a set of values. * Valid operators are In, NotIn, Exists and DoesNotExist. */ operator: z.ZodString; /** * values is an array of string values. If the operator is In or NotIn, * the values array must be non-empty. If the operator is Exists or DoesNotExist, * the values array must be empty. This array is replaced during a strategic * merge patch. */ values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { key: string; operator: string; values?: string[] | undefined; }, { key: string; operator: string; values?: string[] | undefined; }>, "many">>; /** * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels * map is equivalent to an element of matchExpressions, whose key field is "key", the * operator is "In", and the values array contains only "value". The requirements are ANDed. */ matchLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strip", z.ZodTypeAny, { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; }, { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; }>>; }, "strip", z.ZodTypeAny, { name?: string | undefined; selector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; }, { name?: string | undefined; selector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; }>, "many">>; /** * Diff can be used to ignore the modified state of objects which are amended at runtime. */ diff: z.ZodOptional<z.ZodObject<{ /** * ComparePatches match a resource and remove fields from the check for modifications. */ comparePatches: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * APIVersion is the apiVersion of the resource to match. */ apiVersion: z.ZodOptional<z.ZodString>; /** * JSONPointers ignore diffs at a certain JSON path. */ jsonPointers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** * Kind is the kind of the resource to match. */ kind: z.ZodOptional<z.ZodString>; /** * Name is the name of the resource to match. */ name: z.ZodOptional<z.ZodString>; /** * Namespace is the namespace of the resource to match. */ namespace: z.ZodOptional<z.ZodString>; /** * Operations remove a JSON path from the resource. */ operations: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * Op is usually "remove" */ op: z.ZodOptional<z.ZodString>; /** * Path is the JSON path to remove. */ path: z.ZodOptional<z.ZodString>; /** * Value is usually empty. */ value: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { value?: string | undefined; path?: string | undefined; op?: string | undefined; }, { value?: string | undefined; path?: string | undefined; op?: string | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { apiVersion?: string | undefined; kind?: string | undefined; name?: string | undefined; jsonPointers?: string[] | undefined; namespace?: string | undefined; operations?: { value?: string | undefined; path?: string | undefined; op?: string | undefined; }[] | undefined; }, { apiVersion?: string | undefined; kind?: string | undefined; name?: string | undefined; jsonPointers?: string[] | undefined; namespace?: string | undefined; operations?: { value?: string | undefined; path?: string | undefined; op?: string | undefined; }[] | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { comparePatches?: { apiVersion?: string | undefined; kind?: string | undefined; name?: string | undefined; jsonPointers?: string[] | undefined; namespace?: string | undefined; operations?: { value?: string | undefined; path?: string | undefined; op?: string | undefined; }[] | undefined; }[] | undefined; }, { comparePatches?: { apiVersion?: string | undefined; kind?: string | undefined; name?: string | undefined; jsonPointers?: string[] | undefined; namespace?: string | undefined; operations?: { value?: string | undefined; path?: string | undefined; op?: string | undefined; }[] | undefined; }[] | undefined; }>>; /** * ForceSyncGeneration is used to force a redeployment * @format int64 */ forceSyncGeneration: z.ZodOptional<z.ZodNumber>; /** * Helm options for the deployment, like the chart name, repo and values. */ helm: z.ZodOptional<z.ZodObject<{ /** * Atomic sets the --atomic flag when Helm is performing an upgrade */ atomic: z.ZodOptional<z.ZodBoolean>; /** * Chart can refer to any go-getter URL or OCI registry based helm * chart URL. The chart will be downloaded. */ chart: z.ZodOptional<z.ZodString>; /** * DisableDNS can be used to customize Helm's EnableDNS option, which Fleet sets to `true` by default. */ disableDNS: z.ZodOptional<z.ZodBoolean>; /** * DisableDependencyUpdate allows skipping chart dependencies update */ disableDependencyUpdate: z.ZodOptional<z.ZodBoolean>; /** * DisablePreProcess disables template processing in values */ disablePreProcess: z.ZodOptional<z.ZodBoolean>; /** * Force allows to override immutable resources. This could be dangerous. */ force: z.ZodOptional<z.ZodBoolean>; /** * MaxHistory limits the maximum number of revisions saved per release by Helm. */ maxHistory: z.ZodOptional<z.ZodNumber>; /** * ReleaseName sets a custom release name to deploy the chart as. If * not specified a release name will be generated by combining the * invoking GitRepo.name + GitRepo.path. * @maxLength 53 * @pattern ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ */ releaseName: z.ZodOptional<z.ZodString>; /** * Repo is the name of the HTTPS helm repo to download the chart from. */ repo: z.ZodOptional<z.ZodString>; /** * SkipSchemaValidation allows skipping schema validation against the chart values */ skipSchemaValidation: z.ZodOptional<z.ZodBoolean>; /** * TakeOwnership makes helm skip the check for its own annotations */ takeOwnership: z.ZodOptional<z.ZodBoolean>; /** * TimeoutSeconds is the time to wait for Helm operations. */ timeoutSeconds: z.ZodOptional<z.ZodNumber>; /** * Values passed to Helm. It is possible to specify the keys and values * as go template strings. */ values: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>; /** * ValuesFiles is a list of files to load values from. */ valuesFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** * ValuesFrom loads the values from configmaps and secrets. */ valuesFrom: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * The reference to a config map with release values. */ configMapKeyRef: z.ZodOptional<z.ZodObject<{ key: z.ZodOptional<z.ZodString>; /** * Name of a resource in the same namespace as the referent. */ name: z.ZodOptional<z.ZodString>; namespace: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; }, { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; }>>; /** * The reference to a secret with release values. */ secretKeyRef: z.ZodOptional<z.ZodObject<{ key: z.ZodOptional<z.ZodString>; /** * Name of a resource in the same namespace as the referent. */ name: z.ZodOptional<z.ZodString>; namespace: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; }, { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; } | undefined; secretKeyRef?: { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; } | undefined; }, { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; } | undefined; secretKeyRef?: { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; } | undefined; }>, "many">>; /** * Version of the chart to download */ version: z.ZodOptional<z.ZodString>; /** * WaitForJobs if set and timeoutSeconds provided, will wait until all * Jobs have been completed before marking the GitRepo as ready. It * will wait for as long as timeoutSeconds */ waitForJobs: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { values?: {} | undefined; force?: boolean | undefined; atomic?: boolean | undefined; chart?: string | undefined; disableDNS?: boolean | undefined; disableDependencyUpdate?: boolean | undefined; disablePreProcess?: boolean | undefined; maxHistory?: number | undefined; releaseName?: string | undefined; repo?: string | undefined; skipSchemaValidation?: boolean | undefined; takeOwnership?: boolean | undefined; timeoutSeconds?: number | undefined; valuesFiles?: string[] | undefined; valuesFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; } | undefined; secretKeyRef?: { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; } | undefined; }[] | undefined; version?: string | undefined; waitForJobs?: boolean | undefined; }, { values?: {} | undefined; force?: boolean | undefined; atomic?: boolean | undefined; chart?: string | undefined; disableDNS?: boolean | undefined; disableDependencyUpdate?: boolean | undefined; disablePreProcess?: boolean | undefined; maxHistory?: number | undefined; releaseName?: string | undefined; repo?: string | undefined; skipSchemaValidation?: boolean | undefined; takeOwnership?: boolean | undefined; timeoutSeconds?: number | undefined; valuesFiles?: string[] | undefined; valuesFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; } | undefined; secretKeyRef?: { key?: string | undefined; name?: string | undefined; namespace?: string | undefined; } | undefined; }[] | undefined; version?: string | undefined; waitForJobs?: boolean | undefined; }>>; /** * IgnoreOptions can be used to ignore fields when monitoring the bundle. */ ignore: z.ZodOptional<z.ZodObject<{ /** * Conditions is a list of conditions to be ignored when monitoring the Bundle. */ conditions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>, "many">>; }, "strip", z.ZodTypeAny, { conditions?: Record<string, string>[] | undefined; }, { conditions?: Record<string, string>[] | undefined; }>>; /** * KeepResources can be used to keep the deployed resources when removing the bundle */ keepResources: z.ZodOptional<z.ZodBoolean>; /** * Kustomize options for the deployment, like the dir containing the * kustomization.yaml file. */ kustomize: z.ZodOptional<z.ZodObject<{ /** * Dir points to a custom folder for kustomize resources. This folder must contain * a kustomization.yaml file. */ dir: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { dir?: string | undefined; }, { dir?: string | undefined; }>>; /** * TargetNamespace if present will assign all resource to this * namespace and if any cluster scoped resource exists the deployment * will fail. */ namespace: z.ZodOptional<z.ZodString>; /** * NamespaceAnnotations are annotations that will be appended to the namespace created by Fleet. */ namespaceAnnotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; /** * NamespaceLabels are labels that will be appended to the namespace created by Fleet. */ namespaceLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; /** * Paused if set to true, will stop any BundleDeployments from being updated. It will be marked as out of sync. */ paused: z.ZodOptional<z.ZodBoolean>; /** * Resources contains the resources that were read from the bundle's * path. This includes the content of downloaded helm charts. */ resources: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * The content of the resource, can be compressed. */ content: z.ZodOptional<z.ZodString>; /** * Encoding is either empty or "base64+gz". */ encoding: z.ZodOptional<z.ZodString>; /** * Name of the resource, can include the bundle's internal path. */ name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name?: string | undefined; content?: string | undefined; encoding?: string | undefined; }, { name?: string | undefined; content?: string | undefined; encoding?: string | undefined; }>, "many">>; /** * RolloutStrategy controls the rollout of bundles, by defining * partitions, canaries and percentages for cluster availability. */ rolloutStrategy: z.ZodOptional<z.ZodObject<{ /** * A number or percentage of how to automatically partition clusters if no * specific partitioning strategy is configured. * default: 25% */ autoPartitionSize: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>; /** * A number or percentage of clusters that can be unavailable during an update * of a bundle. This follows the same basic approach as a deployment rollout * strategy. Once the number of clusters meets unavailable state update will be * paused. Default value is 100% which doesn't take effect on update. * default: 100% */ maxUnavailable: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>; /** * A number or percentage of cluster partitions that can be unavailable during * an update of a bundle. * default: 0 */ maxUnavailablePartitions: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>; /** * A list of definitions of partitions. If any target clusters do not match * the configuration they are added to partitions at the end following the * autoPartitionSize. */ partitions: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * A cluster group name to include in this partition */ clusterGroup: z.ZodOptional<z.ZodString>; /** * Selector matching cluster group labels to include in this partition */ clusterGroupSelector: z.ZodOptional<z.ZodObject<{ /** * matchExpressions is a list of label selector requirements. The requirements are ANDed. */ matchExpressions: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * key is the label key that the selector applies to. */ key: z.ZodString; /** * operator represents a key's relationship to a set of values. * Valid operators are In, NotIn, Exists and DoesNotExist. */ operator: z.ZodString; /** * values is an array of string values. If the operator is In or NotIn, * the values array must be non-empty. If the operator is Exists or DoesNotExist, * the values array must be empty. This array is replaced during a strategic * merge patch. */ values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { key: string; operator: string; values?: string[] | undefined; }, { key: string; operator: string; values?: string[] | undefined; }>, "many">>; /** * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels * map is equivalent to an element of matchExpressions, whose key field is "key", the * operator is "In", and the values array contains only "value". The requirements are ANDed. */ matchLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strip", z.ZodTypeAny, { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; }, { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; }>>; /** * ClusterName is the name of a cluster to include in this partition */ clusterName: z.ZodOptional<z.ZodString>; /** * Selector matching cluster labels to include in this partition */ clusterSelector: z.ZodOptional<z.ZodObject<{ /** * matchExpressions is a list of label selector requirements. The requirements are ANDed. */ matchExpressions: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * key is the label key that the selector applies to. */ key: z.ZodString; /** * operator represents a key's relationship to a set of values. * Valid operators are In, NotIn, Exists and DoesNotExist. */ operator: z.ZodString; /** * values is an array of string values. If the operator is In or NotIn, * the values array must be non-empty. If the operator is Exists or DoesNotExist, * the values array must be empty. This array is replaced during a strategic * merge patch. */ values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { key: string; operator: string; values?: string[] | undefined; }, { key: string; operator: string; values?: string[] | undefined; }>, "many">>; /** * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels * map is equivalent to an element of matchExpressions, whose key field is "key", the * operator is "In", and the values array contains only "value". The requirements are ANDed. */ matchLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strip", z.ZodTypeAny, { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; }, { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; }>>; /** * A number or percentage of clusters that can be unavailable in this * partition before this partition is treated as done. * default: 10% */ maxUnavailable: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>; /** * A user-friendly name given to the partition used for Display (optional). */ name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name?: string | undefined; maxUnavailable?: string | number | undefined; clusterGroup?: string | undefined; clusterGroupSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; clusterName?: string | undefined; clusterSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; }, { name?: string | undefined; maxUnavailable?: string | number | undefined; clusterGroup?: string | undefined; clusterGroupSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; clusterName?: string | undefined; clusterSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { autoPartitionSize?: string | number | undefined; maxUnavailable?: string | number | undefined; maxUnavailablePartitions?: string | number | undefined; partitions?: { name?: string | undefined; maxUnavailable?: string | number | undefined; clusterGroup?: string | undefined; clusterGroupSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; clusterName?: string | undefined; clusterSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; }[] | undefined; }, { autoPartitionSize?: string | number | undefined; maxUnavailable?: string | number | undefined; maxUnavailablePartitions?: string | number | undefined; partitions?: { name?: string | undefined; maxUnavailable?: string | number | undefined; clusterGroup?: string | undefined; clusterGroupSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; clusterName?: string | undefined; clusterSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; }[] | undefined; }>>; /** * ServiceAccount which will be used to perform this deployment. */ serviceAccount: z.ZodOptional<z.ZodString>; /** * TargetRestrictions is an allow list, which controls if a bundledeployment is created for a target. */ targetRestrictions: z.ZodOptional<z.ZodArray<z.ZodObject<{ clusterGroup: z.ZodOptional<z.ZodString>; /** * A label selector is a label query over a set of resources. The result of matchLabels and * matchExpressions are ANDed. An empty label selector matches all objects. A null * label selector matches no objects. */ clusterGroupSelector: z.ZodOptional<z.ZodObject<{ /** * matchExpressions is a list of label selector requirements. The requirements are ANDed. */ matchExpressions: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * key is the label key that the selector applies to. */ key: z.ZodString; /** * operator represents a key's relationship to a set of values. * Valid operators are In, NotIn, Exists and DoesNotExist. */ operator: z.ZodString; /** * values is an array of string values. If the operator is In or NotIn, * the values array must be non-empty. If the operator is Exists or DoesNotExist, * the values array must be empty. This array is replaced during a strategic * merge patch. */ values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { key: string; operator: string; values?: string[] | undefined; }, { key: string; operator: string; values?: string[] | undefined; }>, "many">>; /** * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels * map is equivalent to an element of matchExpressions, whose key field is "key", the * operator is "In", and the values array contains only "value". The requirements are ANDed. */ matchLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strip", z.ZodTypeAny, { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; }, { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; }>>; clusterName: z.ZodOptional<z.ZodString>; /** * A label selector is a label query over a set of resources. The result of matchLabels and * matchExpressions are ANDed. An empty label selector matches all objects. A null * label selector matches no objects. */ clusterSelector: z.ZodOptional<z.ZodObject<{ /** * matchExpressions is a list of label selector requirements. The requirements are ANDed. */ matchExpressions: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * key is the label key that the selector applies to. */ key: z.ZodString; /** * operator represents a key's relationship to a set of values. * Valid operators are In, NotIn, Exists and DoesNotExist. */ operator: z.ZodString; /** * values is an array of string values. If the operator is In or NotIn, * the values array must be non-empty. If the operator is Exists or DoesNotExist, * the values array must be empty. This array is replaced during a strategic * merge patch. */ values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { key: string; operator: string; values?: string[] | undefined; }, { key: string; operator: string; values?: string[] | undefined; }>, "many">>; /** * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels * map is equivalent to an element of matchExpressions, whose key field is "key", the * operator is "In", and the values array contains only "value". The requirements are ANDed. */ matchLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strip", z.ZodTypeAny, { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; }, { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; }>>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name?: string | undefined; clusterGroup?: string | undefined; clusterGroupSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; clusterName?: string | undefined; clusterSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; }, { name?: string | undefined; clusterGroup?: string | undefined; clusterGroupSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; clusterName?: string | undefined; clusterSelector?: { matchExpressions?: { key: string; operator: string; values?: string[] | undefined; }[] | undefined; matchLabels?: Record<string, string> | undefined; } | undefined; }>, "many">>; /** * Targets refer to the clusters which will be deployed to. * Targets are evaluated in order and the first one to match is used. */ targets: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * ClusterGroup to match a specific cluster group by name. */ clusterGroup: z.ZodOptional<z.ZodString>; /**