@soft-stech/fleet
Version:
758 lines (757 loc) • 69.6 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IClusterSchema = 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");
/**
* Cluster corresponds to a Kubernetes cluster. Fleet deploys bundles to targeted clusters.
* Clusters to which Fleet deploys manifests are referred to as downstream
* clusters. In the single cluster use case, the Fleet manager Kubernetes
* cluster is both the manager and downstream cluster at the same time.
*/
exports.IClusterSchema = zod_1.z.object({
/**
* 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"),
/**
* 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("Cluster"),
"metadata": ObjectMeta_schema_1.iObjectMetaSchema.optional(),
"spec": zod_1.z.object({
/**
* AgentAffinity overrides the default affinity for the cluster's agent
* deployment. If this value is nil the default affinity is used.
*/
"agentAffinity": zod_1.z.object({
/**
* Describes node affinity scheduling rules for the pod.
*/
"nodeAffinity": zod_1.z.object({
/**
* The scheduler will prefer to schedule pods to nodes that satisfy
* the affinity expressions specified by this field, but it may choose
* a node that violates one or more of the expressions. The node that is
* most preferred is the one with the greatest sum of weights, i.e.
* for each node that meets all of the scheduling requirements (resource
* request, requiredDuringScheduling affinity expressions, etc.),
* compute a sum by iterating through the elements of this field and adding
* "weight" to the sum if the node matches the corresponding matchExpressions; the
* node(s) with the highest sum are the most preferred.
*/
"preferredDuringSchedulingIgnoredDuringExecution": zod_1.z.array(zod_1.z.object({
/**
* A node selector term, associated with the corresponding weight.
*/
"preference": zod_1.z.object({
/**
* A list of node selector requirements by node's labels.
*/
"matchExpressions": zod_1.z.array(zod_1.z.object({
/**
* The label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* Represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
*/
"operator": zod_1.z.string(),
/**
* 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. If the operator is Gt or Lt, the values
* array must have a single element, which will be interpreted as an integer.
* This array is replaced during a strategic merge patch.
*/
"values": zod_1.z.array(zod_1.z.string()).optional()
})).optional(),
/**
* A list of node selector requirements by node's fields.
*/
"matchFields": zod_1.z.array(zod_1.z.object({
/**
* The label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* Represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
*/
"operator": zod_1.z.string(),
/**
* 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. If the operator is Gt or Lt, the values
* array must have a single element, which will be interpreted as an integer.
* This array is replaced during a strategic merge patch.
*/
"values": zod_1.z.array(zod_1.z.string()).optional()
})).optional()
}),
/**
* Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
* @format int32
*/
"weight": zod_1.z.number()
})).optional(),
/**
* If the affinity requirements specified by this field are not met at
* scheduling time, the pod will not be scheduled onto the node.
* If the affinity requirements specified by this field cease to be met
* at some point during pod execution (e.g. due to an update), the system
* may or may not try to eventually evict the pod from its node.
*/
"requiredDuringSchedulingIgnoredDuringExecution": zod_1.z.object({
/**
* Required. A list of node selector terms. The terms are ORed.
*/
"nodeSelectorTerms": zod_1.z.array(zod_1.z.object({
/**
* A list of node selector requirements by node's labels.
*/
"matchExpressions": zod_1.z.array(zod_1.z.object({
/**
* The label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* Represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
*/
"operator": zod_1.z.string(),
/**
* 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. If the operator is Gt or Lt, the values
* array must have a single element, which will be interpreted as an integer.
* This array is replaced during a strategic merge patch.
*/
"values": zod_1.z.array(zod_1.z.string()).optional()
})).optional(),
/**
* A list of node selector requirements by node's fields.
*/
"matchFields": zod_1.z.array(zod_1.z.object({
/**
* The label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* Represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
*/
"operator": zod_1.z.string(),
/**
* 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. If the operator is Gt or Lt, the values
* array must have a single element, which will be interpreted as an integer.
* This array is replaced during a strategic merge patch.
*/
"values": zod_1.z.array(zod_1.z.string()).optional()
})).optional()
}))
}).optional()
}).optional(),
/**
* Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
*/
"podAffinity": zod_1.z.object({
/**
* The scheduler will prefer to schedule pods to nodes that satisfy
* the affinity expressions specified by this field, but it may choose
* a node that violates one or more of the expressions. The node that is
* most preferred is the one with the greatest sum of weights, i.e.
* for each node that meets all of the scheduling requirements (resource
* request, requiredDuringScheduling affinity expressions, etc.),
* compute a sum by iterating through the elements of this field and adding
* "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
* node(s) with the highest sum are the most preferred.
*/
"preferredDuringSchedulingIgnoredDuringExecution": zod_1.z.array(zod_1.z.object({
/**
* Required. A pod affinity term, associated with the corresponding weight.
*/
"podAffinityTerm": zod_1.z.object({
/**
* A label query over a set of resources, in this case pods.
* If it's null, this PodAffinityTerm matches with no Pods.
*/
"labelSelector": zod_1.z.object({
/**
* matchExpressions is a list of label selector requirements. The requirements are ANDed.
*/
"matchExpressions": zod_1.z.array(zod_1.z.object({
/**
* key is the label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* operator represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists and DoesNotExist.
*/
"operator": zod_1.z.string(),
/**
* 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": zod_1.z.array(zod_1.z.string()).optional()
})).optional(),
/**
* 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": zod_1.z.record(zod_1.z.string()).optional()
}).optional(),
/**
* MatchLabelKeys is a set of pod label keys to select which pods will
* be taken into consideration. The keys are used to lookup values from the
* incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
* to select the group of existing pods which pods will be taken into consideration
* for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
* pod labels will be ignored. The default value is empty.
* The same key is forbidden to exist in both matchLabelKeys and labelSelector.
* Also, matchLabelKeys cannot be set when labelSelector isn't set.
* This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
*/
"matchLabelKeys": zod_1.z.array(zod_1.z.string()).optional(),
/**
* MismatchLabelKeys is a set of pod label keys to select which pods will
* be taken into consideration. The keys are used to lookup values from the
* incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
* to select the group of existing pods which pods will be taken into consideration
* for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
* pod labels will be ignored. The default value is empty.
* The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
* Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
* This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
*/
"mismatchLabelKeys": zod_1.z.array(zod_1.z.string()).optional(),
/**
* A label query over the set of namespaces that the term applies to.
* The term is applied to the union of the namespaces selected by this field
* and the ones listed in the namespaces field.
* null selector and null or empty namespaces list means "this pod's namespace".
* An empty selector ({}) matches all namespaces.
*/
"namespaceSelector": zod_1.z.object({
/**
* matchExpressions is a list of label selector requirements. The requirements are ANDed.
*/
"matchExpressions": zod_1.z.array(zod_1.z.object({
/**
* key is the label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* operator represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists and DoesNotExist.
*/
"operator": zod_1.z.string(),
/**
* 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": zod_1.z.array(zod_1.z.string()).optional()
})).optional(),
/**
* 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": zod_1.z.record(zod_1.z.string()).optional()
}).optional(),
/**
* namespaces specifies a static list of namespace names that the term applies to.
* The term is applied to the union of the namespaces listed in this field
* and the ones selected by namespaceSelector.
* null or empty namespaces list and null namespaceSelector means "this pod's namespace".
*/
"namespaces": zod_1.z.array(zod_1.z.string()).optional(),
/**
* This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
* the labelSelector in the specified namespaces, where co-located is defined as running on a node
* whose value of the label with key topologyKey matches that of any node on which any of the
* selected pods is running.
* Empty topologyKey is not allowed.
*/
"topologyKey": zod_1.z.string()
}),
/**
* weight associated with matching the corresponding podAffinityTerm,
* in the range 1-100.
* @format int32
*/
"weight": zod_1.z.number()
})).optional(),
/**
* If the affinity requirements specified by this field are not met at
* scheduling time, the pod will not be scheduled onto the node.
* If the affinity requirements specified by this field cease to be met
* at some point during pod execution (e.g. due to a pod label update), the
* system may or may not try to eventually evict the pod from its node.
* When there are multiple elements, the lists of nodes corresponding to each
* podAffinityTerm are intersected, i.e. all terms must be satisfied.
*/
"requiredDuringSchedulingIgnoredDuringExecution": zod_1.z.array(zod_1.z.object({
/**
* A label query over a set of resources, in this case pods.
* If it's null, this PodAffinityTerm matches with no Pods.
*/
"labelSelector": zod_1.z.object({
/**
* matchExpressions is a list of label selector requirements. The requirements are ANDed.
*/
"matchExpressions": zod_1.z.array(zod_1.z.object({
/**
* key is the label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* operator represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists and DoesNotExist.
*/
"operator": zod_1.z.string(),
/**
* 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": zod_1.z.array(zod_1.z.string()).optional()
})).optional(),
/**
* 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": zod_1.z.record(zod_1.z.string()).optional()
}).optional(),
/**
* MatchLabelKeys is a set of pod label keys to select which pods will
* be taken into consideration. The keys are used to lookup values from the
* incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
* to select the group of existing pods which pods will be taken into consideration
* for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
* pod labels will be ignored. The default value is empty.
* The same key is forbidden to exist in both matchLabelKeys and labelSelector.
* Also, matchLabelKeys cannot be set when labelSelector isn't set.
* This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
*/
"matchLabelKeys": zod_1.z.array(zod_1.z.string()).optional(),
/**
* MismatchLabelKeys is a set of pod label keys to select which pods will
* be taken into consideration. The keys are used to lookup values from the
* incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
* to select the group of existing pods which pods will be taken into consideration
* for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
* pod labels will be ignored. The default value is empty.
* The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
* Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
* This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
*/
"mismatchLabelKeys": zod_1.z.array(zod_1.z.string()).optional(),
/**
* A label query over the set of namespaces that the term applies to.
* The term is applied to the union of the namespaces selected by this field
* and the ones listed in the namespaces field.
* null selector and null or empty namespaces list means "this pod's namespace".
* An empty selector ({}) matches all namespaces.
*/
"namespaceSelector": zod_1.z.object({
/**
* matchExpressions is a list of label selector requirements. The requirements are ANDed.
*/
"matchExpressions": zod_1.z.array(zod_1.z.object({
/**
* key is the label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* operator represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists and DoesNotExist.
*/
"operator": zod_1.z.string(),
/**
* 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": zod_1.z.array(zod_1.z.string()).optional()
})).optional(),
/**
* 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": zod_1.z.record(zod_1.z.string()).optional()
}).optional(),
/**
* namespaces specifies a static list of namespace names that the term applies to.
* The term is applied to the union of the namespaces listed in this field
* and the ones selected by namespaceSelector.
* null or empty namespaces list and null namespaceSelector means "this pod's namespace".
*/
"namespaces": zod_1.z.array(zod_1.z.string()).optional(),
/**
* This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
* the labelSelector in the specified namespaces, where co-located is defined as running on a node
* whose value of the label with key topologyKey matches that of any node on which any of the
* selected pods is running.
* Empty topologyKey is not allowed.
*/
"topologyKey": zod_1.z.string()
})).optional()
}).optional(),
/**
* Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
*/
"podAntiAffinity": zod_1.z.object({
/**
* The scheduler will prefer to schedule pods to nodes that satisfy
* the anti-affinity expressions specified by this field, but it may choose
* a node that violates one or more of the expressions. The node that is
* most preferred is the one with the greatest sum of weights, i.e.
* for each node that meets all of the scheduling requirements (resource
* request, requiredDuringScheduling anti-affinity expressions, etc.),
* compute a sum by iterating through the elements of this field and adding
* "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
* node(s) with the highest sum are the most preferred.
*/
"preferredDuringSchedulingIgnoredDuringExecution": zod_1.z.array(zod_1.z.object({
/**
* Required. A pod affinity term, associated with the corresponding weight.
*/
"podAffinityTerm": zod_1.z.object({
/**
* A label query over a set of resources, in this case pods.
* If it's null, this PodAffinityTerm matches with no Pods.
*/
"labelSelector": zod_1.z.object({
/**
* matchExpressions is a list of label selector requirements. The requirements are ANDed.
*/
"matchExpressions": zod_1.z.array(zod_1.z.object({
/**
* key is the label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* operator represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists and DoesNotExist.
*/
"operator": zod_1.z.string(),
/**
* 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": zod_1.z.array(zod_1.z.string()).optional()
})).optional(),
/**
* 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": zod_1.z.record(zod_1.z.string()).optional()
}).optional(),
/**
* MatchLabelKeys is a set of pod label keys to select which pods will
* be taken into consideration. The keys are used to lookup values from the
* incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
* to select the group of existing pods which pods will be taken into consideration
* for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
* pod labels will be ignored. The default value is empty.
* The same key is forbidden to exist in both matchLabelKeys and labelSelector.
* Also, matchLabelKeys cannot be set when labelSelector isn't set.
* This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
*/
"matchLabelKeys": zod_1.z.array(zod_1.z.string()).optional(),
/**
* MismatchLabelKeys is a set of pod label keys to select which pods will
* be taken into consideration. The keys are used to lookup values from the
* incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
* to select the group of existing pods which pods will be taken into consideration
* for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
* pod labels will be ignored. The default value is empty.
* The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
* Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
* This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
*/
"mismatchLabelKeys": zod_1.z.array(zod_1.z.string()).optional(),
/**
* A label query over the set of namespaces that the term applies to.
* The term is applied to the union of the namespaces selected by this field
* and the ones listed in the namespaces field.
* null selector and null or empty namespaces list means "this pod's namespace".
* An empty selector ({}) matches all namespaces.
*/
"namespaceSelector": zod_1.z.object({
/**
* matchExpressions is a list of label selector requirements. The requirements are ANDed.
*/
"matchExpressions": zod_1.z.array(zod_1.z.object({
/**
* key is the label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* operator represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists and DoesNotExist.
*/
"operator": zod_1.z.string(),
/**
* 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": zod_1.z.array(zod_1.z.string()).optional()
})).optional(),
/**
* 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": zod_1.z.record(zod_1.z.string()).optional()
}).optional(),
/**
* namespaces specifies a static list of namespace names that the term applies to.
* The term is applied to the union of the namespaces listed in this field
* and the ones selected by namespaceSelector.
* null or empty namespaces list and null namespaceSelector means "this pod's namespace".
*/
"namespaces": zod_1.z.array(zod_1.z.string()).optional(),
/**
* This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
* the labelSelector in the specified namespaces, where co-located is defined as running on a node
* whose value of the label with key topologyKey matches that of any node on which any of the
* selected pods is running.
* Empty topologyKey is not allowed.
*/
"topologyKey": zod_1.z.string()
}),
/**
* weight associated with matching the corresponding podAffinityTerm,
* in the range 1-100.
* @format int32
*/
"weight": zod_1.z.number()
})).optional(),
/**
* If the anti-affinity requirements specified by this field are not met at
* scheduling time, the pod will not be scheduled onto the node.
* If the anti-affinity requirements specified by this field cease to be met
* at some point during pod execution (e.g. due to a pod label update), the
* system may or may not try to eventually evict the pod from its node.
* When there are multiple elements, the lists of nodes corresponding to each
* podAffinityTerm are intersected, i.e. all terms must be satisfied.
*/
"requiredDuringSchedulingIgnoredDuringExecution": zod_1.z.array(zod_1.z.object({
/**
* A label query over a set of resources, in this case pods.
* If it's null, this PodAffinityTerm matches with no Pods.
*/
"labelSelector": zod_1.z.object({
/**
* matchExpressions is a list of label selector requirements. The requirements are ANDed.
*/
"matchExpressions": zod_1.z.array(zod_1.z.object({
/**
* key is the label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* operator represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists and DoesNotExist.
*/
"operator": zod_1.z.string(),
/**
* 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": zod_1.z.array(zod_1.z.string()).optional()
})).optional(),
/**
* 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": zod_1.z.record(zod_1.z.string()).optional()
}).optional(),
/**
* MatchLabelKeys is a set of pod label keys to select which pods will
* be taken into consideration. The keys are used to lookup values from the
* incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
* to select the group of existing pods which pods will be taken into consideration
* for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
* pod labels will be ignored. The default value is empty.
* The same key is forbidden to exist in both matchLabelKeys and labelSelector.
* Also, matchLabelKeys cannot be set when labelSelector isn't set.
* This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
*/
"matchLabelKeys": zod_1.z.array(zod_1.z.string()).optional(),
/**
* MismatchLabelKeys is a set of pod label keys to select which pods will
* be taken into consideration. The keys are used to lookup values from the
* incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
* to select the group of existing pods which pods will be taken into consideration
* for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
* pod labels will be ignored. The default value is empty.
* The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
* Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
* This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
*/
"mismatchLabelKeys": zod_1.z.array(zod_1.z.string()).optional(),
/**
* A label query over the set of namespaces that the term applies to.
* The term is applied to the union of the namespaces selected by this field
* and the ones listed in the namespaces field.
* null selector and null or empty namespaces list means "this pod's namespace".
* An empty selector ({}) matches all namespaces.
*/
"namespaceSelector": zod_1.z.object({
/**
* matchExpressions is a list of label selector requirements. The requirements are ANDed.
*/
"matchExpressions": zod_1.z.array(zod_1.z.object({
/**
* key is the label key that the selector applies to.
*/
"key": zod_1.z.string(),
/**
* operator represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists and DoesNotExist.
*/
"operator": zod_1.z.string(),
/**
* 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": zod_1.z.array(zod_1.z.string()).optional()
})).optional(),
/**
* 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": zod_1.z.record(zod_1.z.string()).optional()
}).optional(),
/**
* namespaces specifies a static list of namespace names that the term applies to.
* The term is applied to the union of the namespaces listed in this field
* and the ones selected by namespaceSelector.
* null or empty namespaces list and null namespaceSelector means "this pod's namespace".
*/
"namespaces": zod_1.z.array(zod_1.z.string()).optional(),
/**
* This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
* the labelSelector in the specified namespaces, where co-located is defined as running on a node
* whose value of the label with key topologyKey matches that of any node on which any of the
* selected pods is running.
* Empty topologyKey is not allowed.
*/
"topologyKey": zod_1.z.string()
})).optional()
}).optional()
}).optional(),
/**
* AgentEnvVars are extra environment variables to be added to the agent deployment.
*/
"agentEnvVars": zod_1.z.array(zod_1.z.object({
/**
* Name of the environment variable. Must be a C_IDENTIFIER.
*/
"name": zod_1.z.string(),
/**
* Variable references $(VAR_NAME) are expanded
* using the previously defined environment variables in the container and
* any service environment variables. If a variable cannot be resolved,
* the reference in the input string will be unchanged. Double $$ are reduced
* to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
* "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
* Escaped references will never be expanded, regardless of whether the variable
* exists or not.
* Defaults to "".
*/
"value": zod_1.z.string().optional(),
/**
* Source for the environment variable's value. Cannot be used if value is not empty.
*/
"valueFrom": zod_1.z.object({
/**
* Selects a key of a ConfigMap.
*/
"configMapKeyRef": zod_1.z.object({
/**
* The key to select.
*/
"key": zod_1.z.string(),
/**
* Name of the referent.
* This field is effectively required, but due to backwards compatibility is
* allowed to be empty. Instances of this type with an empty value here are
* almost certainly wrong.
* TODO: Add other useful fields. apiVersion, kind, uid?
* More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
* TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
*/
"name": zod_1.z.string().optional(),
/**
* Specify whether the ConfigMap or its key must be defined
*/
"optional": zod_1.z.boolean().optional()
}).optional(),
/**
* Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
* spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
*/
"fieldRef": zod_1.z.object({
/**
* Version of the schema the FieldPath is written in terms of, defaults to "v1".
*/
"apiVersion": zod_1.z.string().optional(),
/**
* Path of the field to select in the specified API version.
*/
"fieldPath": zod_1.z.string()
}).optional(),
/**
* Selects a resource of the container: only resources limits and requests
* (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
*/
"resourceFieldRef": zod_1.z.object({
/**
* Container name: required for volumes, optional for env vars
*/
"containerName": zod_1.z.string().optional(),
/**
* Specifies the output format of the exposed resources, defaults to "1"
* @schema union([z.number(), z.string().regex(/^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$/)]).optional()
*/
"divisor": zod_1.z.union([zod_1.z.number(), zod_1.z.string().regex(/^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$/)]).optional(),
/**
* Required: resource to select
*/
"resource": zod_1.z.string()