diff --git a/docs/stack_crd.yaml b/docs/stack_crd.yaml index 3ef9f141..5ad76a05 100644 --- a/docs/stack_crd.yaml +++ b/docs/stack_crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.5 + controller-gen.kubebuilder.io/version: v0.18.0 name: stacks.zalando.org spec: group: zalando.org @@ -92,7 +92,9 @@ spec: policies: description: |- policies is a list of potential scaling polices which can be used during scaling. - At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid + If not set, use the default values: + - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. + - For scale down: allow all pods to be removed in a 15s window. items: description: HPAScalingPolicy is a single policy which must hold true for a specified past interval. @@ -135,6 +137,24 @@ spec: - For scale down: 300 (i.e. the stabilization window is 300 seconds long). format: int32 type: integer + tolerance: + anyOf: + - type: integer + - type: string + description: |- + tolerance is the tolerance on the ratio between the current and desired + metric value under which no updates are made to the desired number of + replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not + set, the default cluster-wide tolerance is applied (by default 10%). + + For example, if autoscaling is configured with a memory consumption target of 100Mi, + and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be + triggered when the actual consumption falls below 95Mi or exceeds 101Mi. + + This is an alpha field and requires enabling the HPAConfigurableTolerance + feature gate. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object scaleUp: description: |- @@ -147,7 +167,9 @@ spec: policies: description: |- policies is a list of potential scaling polices which can be used during scaling. - At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid + If not set, use the default values: + - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. + - For scale down: allow all pods to be removed in a 15s window. items: description: HPAScalingPolicy is a single policy which must hold true for a specified past interval. @@ -190,6 +212,24 @@ spec: - For scale down: 300 (i.e. the stabilization window is 300 seconds long). format: int32 type: integer + tolerance: + anyOf: + - type: integer + - type: string + description: |- + tolerance is the tolerance on the ratio between the current and desired + metric value under which no updates are made to the desired number of + replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not + set, the default cluster-wide tolerance is applied (by default 10%). + + For example, if autoscaling is configured with a memory consumption target of 100Mi, + and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be + triggered when the actual consumption falls below 95Mi or exceeds 101Mi. + + This is an alpha field and requires enabling the HPAConfigurableTolerance + feature gate. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object maxReplicas: @@ -815,31 +855,11 @@ spec: type: object x-kubernetes-map-type: atomic matchLabelKeys: - description: |- - 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 a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array x-kubernetes-list-type: atomic mismatchLabelKeys: - description: |- - 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 a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -887,12 +907,6 @@ spec: type: array x-kubernetes-list-type: atomic topologyKey: - description: |- - 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. type: string required: - topologyKey @@ -1057,31 +1071,11 @@ spec: type: object x-kubernetes-map-type: atomic matchLabelKeys: - description: |- - 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 a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array x-kubernetes-list-type: atomic mismatchLabelKeys: - description: |- - 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 a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1214,7 +1208,6 @@ spec: value. Cannot be used if value is not empty. properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: type: string @@ -1254,8 +1247,6 @@ spec: type: object x-kubernetes-map-type: atomic secretKeyRef: - description: Selects a key of a secret in - the pod's namespace properties: key: type: string @@ -1286,7 +1277,7 @@ spec: Cannot be updated. items: description: EnvFromSource represents the source of - a set of ConfigMaps + a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -1295,14 +1286,12 @@ spec: default: "" type: string optional: - description: Specify whether the ConfigMap - must be defined type: boolean type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend - to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name + of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -1311,8 +1300,6 @@ spec: default: "" type: string optional: - description: Specify whether the Secret must - be defined type: boolean type: object x-kubernetes-map-type: atomic @@ -1347,7 +1334,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: items: @@ -1356,7 +1344,7 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -1387,8 +1375,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration that - the container should sleep before being terminated. + description: Sleep represents a duration that + the container should sleep. properties: seconds: format: int64 @@ -1399,8 +1387,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -1426,7 +1414,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: items: @@ -1435,7 +1424,7 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -1466,8 +1455,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration that - the container should sleep before being terminated. + description: Sleep represents a duration that + the container should sleep. properties: seconds: format: int64 @@ -1478,8 +1467,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -1492,6 +1481,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -1501,15 +1496,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -1522,8 +1512,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC service. @@ -1542,7 +1531,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -1554,8 +1543,6 @@ spec: description: Custom headers to set in the request. HTTP allows repeated headers. items: - description: HTTPHeader describes a custom - header to be used in HTTP probes properties: name: type: string @@ -1606,7 +1593,7 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action involving + description: TCPSocket specifies a connection to a TCP port. properties: host: @@ -1712,15 +1699,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -1733,8 +1715,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC service. @@ -1753,7 +1734,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -1765,8 +1746,6 @@ spec: description: Custom headers to set in the request. HTTP allows repeated headers. items: - description: HTTPHeader describes a custom - header to be used in HTTP probes properties: name: type: string @@ -1817,7 +1796,7 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action involving + description: TCPSocket specifies a connection to a TCP port. properties: host: @@ -1900,10 +1879,6 @@ spec: in PodSpec.ResourceClaims. properties: name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. type: string request: type: string @@ -2006,16 +1981,12 @@ spec: add: description: Added capabilities items: - description: Capability represent POSIX capabilities - type type: string type: array x-kubernetes-list-type: atomic drop: description: Removed capabilities items: - description: Capability represent POSIX capabilities - type type: string type: array x-kubernetes-list-type: atomic @@ -2163,15 +2134,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -2184,8 +2150,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC service. @@ -2204,7 +2169,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -2216,8 +2181,6 @@ spec: description: Custom headers to set in the request. HTTP allows repeated headers. items: - description: HTTPHeader describes a custom - header to be used in HTTP probes properties: name: type: string @@ -2268,7 +2231,7 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action involving + description: TCPSocket specifies a connection to a TCP port. properties: host: @@ -2483,9 +2446,13 @@ spec: options of a pod. properties: name: - description: Required. + description: |- + Name is this DNS resolver option's name. + Required. type: string value: + description: Value is this DNS resolver option's + value. type: string type: object type: array @@ -2589,7 +2556,6 @@ spec: value. Cannot be used if value is not empty. properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: type: string @@ -2629,8 +2595,6 @@ spec: type: object x-kubernetes-map-type: atomic secretKeyRef: - description: Selects a key of a secret in - the pod's namespace properties: key: type: string @@ -2661,7 +2625,7 @@ spec: Cannot be updated. items: description: EnvFromSource represents the source of - a set of ConfigMaps + a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -2670,14 +2634,12 @@ spec: default: "" type: string optional: - description: Specify whether the ConfigMap - must be defined type: boolean type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend - to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name + of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -2686,8 +2648,6 @@ spec: default: "" type: string optional: - description: Specify whether the Secret must - be defined type: boolean type: object x-kubernetes-map-type: atomic @@ -2719,7 +2679,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: items: @@ -2728,7 +2689,7 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -2759,8 +2720,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration that - the container should sleep before being terminated. + description: Sleep represents a duration that + the container should sleep. properties: seconds: format: int64 @@ -2771,8 +2732,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -2798,7 +2759,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: items: @@ -2807,7 +2769,7 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -2838,8 +2800,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration that - the container should sleep before being terminated. + description: Sleep represents a duration that + the container should sleep. properties: seconds: format: int64 @@ -2850,8 +2812,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -2864,20 +2826,21 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: Probes are not allowed for ephemeral containers. properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -2890,8 +2853,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC service. @@ -2910,7 +2872,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -2922,8 +2884,6 @@ spec: description: Custom headers to set in the request. HTTP allows repeated headers. items: - description: HTTPHeader describes a custom - header to be used in HTTP probes properties: name: type: string @@ -2974,7 +2934,7 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action involving + description: TCPSocket specifies a connection to a TCP port. properties: host: @@ -3068,15 +3028,10 @@ spec: description: Probes are not allowed for ephemeral containers. properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3089,8 +3044,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC service. @@ -3109,7 +3063,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -3121,8 +3075,6 @@ spec: description: Custom headers to set in the request. HTTP allows repeated headers. items: - description: HTTPHeader describes a custom - header to be used in HTTP probes properties: name: type: string @@ -3173,7 +3125,7 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action involving + description: TCPSocket specifies a connection to a TCP port. properties: host: @@ -3255,10 +3207,6 @@ spec: in PodSpec.ResourceClaims. properties: name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. type: string request: type: string @@ -3349,16 +3297,12 @@ spec: add: description: Added capabilities items: - description: Capability represent POSIX capabilities - type type: string type: array x-kubernetes-list-type: atomic drop: description: Removed capabilities items: - description: Capability represent POSIX capabilities - type type: string type: array x-kubernetes-list-type: atomic @@ -3499,15 +3443,10 @@ spec: description: Probes are not allowed for ephemeral containers. properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3520,8 +3459,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC service. @@ -3540,7 +3478,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -3552,8 +3490,6 @@ spec: description: Custom headers to set in the request. HTTP allows repeated headers. items: - description: HTTPHeader describes a custom - header to be used in HTTP probes properties: name: type: string @@ -3604,7 +3540,7 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action involving + description: TCPSocket specifies a connection to a TCP port. properties: host: @@ -3895,7 +3831,7 @@ spec: Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of - of that value or the sum of the normal containers. Limits are applied to init containers + that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. @@ -3961,7 +3897,6 @@ spec: value. Cannot be used if value is not empty. properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: type: string @@ -4001,8 +3936,6 @@ spec: type: object x-kubernetes-map-type: atomic secretKeyRef: - description: Selects a key of a secret in - the pod's namespace properties: key: type: string @@ -4033,7 +3966,7 @@ spec: Cannot be updated. items: description: EnvFromSource represents the source of - a set of ConfigMaps + a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -4042,14 +3975,12 @@ spec: default: "" type: string optional: - description: Specify whether the ConfigMap - must be defined type: boolean type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend - to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name + of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -4058,8 +3989,6 @@ spec: default: "" type: string optional: - description: Specify whether the Secret must - be defined type: boolean type: object x-kubernetes-map-type: atomic @@ -4094,7 +4023,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: items: @@ -4103,7 +4033,7 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -4134,8 +4064,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration that - the container should sleep before being terminated. + description: Sleep represents a duration that + the container should sleep. properties: seconds: format: int64 @@ -4146,8 +4076,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -4173,7 +4103,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: items: @@ -4182,7 +4113,7 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -4213,8 +4144,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration that - the container should sleep before being terminated. + description: Sleep represents a duration that + the container should sleep. properties: seconds: format: int64 @@ -4225,8 +4156,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -4239,6 +4170,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -4248,15 +4185,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -4269,8 +4201,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC service. @@ -4289,7 +4220,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -4301,8 +4232,6 @@ spec: description: Custom headers to set in the request. HTTP allows repeated headers. items: - description: HTTPHeader describes a custom - header to be used in HTTP probes properties: name: type: string @@ -4353,7 +4282,7 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action involving + description: TCPSocket specifies a connection to a TCP port. properties: host: @@ -4459,15 +4388,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -4480,8 +4404,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC service. @@ -4500,7 +4423,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -4512,8 +4435,6 @@ spec: description: Custom headers to set in the request. HTTP allows repeated headers. items: - description: HTTPHeader describes a custom - header to be used in HTTP probes properties: name: type: string @@ -4564,7 +4485,7 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action involving + description: TCPSocket specifies a connection to a TCP port. properties: host: @@ -4749,16 +4670,12 @@ spec: add: description: Added capabilities items: - description: Capability represent POSIX capabilities - type type: string type: array x-kubernetes-list-type: atomic drop: description: Removed capabilities items: - description: Capability represent POSIX capabilities - type type: string type: array x-kubernetes-list-type: atomic @@ -4906,15 +4823,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to take. + description: Exec specifies a command to execute + in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -4927,8 +4839,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC service. @@ -4947,7 +4858,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http request + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -4959,8 +4870,6 @@ spec: description: Custom headers to set in the request. HTTP allows repeated headers. items: - description: HTTPHeader describes a custom - header to be used in HTTP probes properties: name: type: string @@ -5011,7 +4920,7 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action involving + description: TCPSocket specifies a connection to a TCP port. properties: host: @@ -5378,6 +5287,74 @@ spec: x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map + resources: + description: |- + Resources is the total amount of CPU and Memory resources required by all + containers in the pod. It supports specifying Requests and Limits for + "cpu" and "memory" resource names only. ResourceClaims are not supported. + + This field enables fine-grained control over resource allocation for the + entire pod, allowing resource sharing among containers in a pod. + + This is an alpha field and requires enabling the PodLevelResources feature + gate. + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object restartPolicy: description: |- Restart policy for all containers within the pod. @@ -5502,6 +5479,32 @@ spec: Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer + seLinuxChangePolicy: + description: |- + seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + Valid values are "MountOption" and "Recursive". + + "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. + + "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + This requires all Pods that share the same volume to use the same SELinux label. + It is not possible to share the same volume among privileged and unprivileged Pods. + Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + CSIDriver instance. Other volumes are always re-labelled recursively. + "MountOption" value is allowed only when SELinuxMount feature gate is enabled. + + If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + and "Recursive" for all other volumes. + + This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. + + All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + Note that this field cannot be set when spec.os.name is windows. + type: string seLinuxOptions: description: |- The SELinux context to be applied to all containers. @@ -5737,13 +5740,8 @@ spec: relates the key and values. properties: key: - description: key is the label key that the - selector applies to. type: string operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: items: @@ -5834,7 +5832,6 @@ spec: - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string nodeTaintsPolicy: description: |- @@ -5845,7 +5842,6 @@ spec: - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string topologyKey: description: |- @@ -5903,6 +5899,8 @@ spec: description: |- awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore properties: fsType: @@ -5934,8 +5932,10 @@ spec: - volumeID type: object azureDisk: - description: azureDisk represents an Azure Data Disk - mount on the host and bind mount to the pod. + description: |- + azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + are redirected to the disk.csi.azure.com CSI driver. properties: cachingMode: description: 'cachingMode is the Host Caching mode: @@ -5974,8 +5974,10 @@ spec: - diskURI type: object azureFile: - description: azureFile represents an Azure File Service - mount on the host and bind mount to the pod. + description: |- + azureFile represents an Azure File Service mount on the host and bind mount to the pod. + Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + are redirected to the file.csi.azure.com CSI driver. properties: readOnly: description: |- @@ -5994,8 +5996,9 @@ spec: - shareName type: object cephfs: - description: cephFS represents a Ceph FS mount on the - host that shares a pod's lifetime + description: |- + cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. properties: monitors: description: |- @@ -6048,6 +6051,8 @@ spec: cinder: description: |- cinder represents a cinder volume attached and mounted on kubelets host machine. + Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md properties: fsType: @@ -6116,7 +6121,6 @@ spec: a volume. properties: key: - description: key is the key to project. type: string mode: format: int32 @@ -6147,7 +6151,7 @@ spec: csi: description: csi (Container Storage Interface) represents ephemeral storage that is handled by certain external - CSI drivers (Beta feature). + CSI drivers. properties: driver: description: |- @@ -6219,9 +6223,6 @@ spec: pod field properties: fieldRef: - description: 'Required: Selects a field of - the pod: only annotations, labels, name, - namespace and uid are supported.' properties: apiVersion: type: string @@ -6478,6 +6479,7 @@ spec: description: |- flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. properties: driver: description: driver is the name of the driver to @@ -6523,9 +6525,9 @@ spec: - driver type: object flocker: - description: flocker represents a Flocker volume attached - to a kubelet's host machine. This depends on the Flocker - control service being running + description: |- + flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. properties: datasetName: description: |- @@ -6541,6 +6543,8 @@ spec: description: |- gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk properties: fsType: @@ -6576,7 +6580,7 @@ spec: gitRepo: description: |- gitRepo represents a git repository at a particular revision. - DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an + Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. properties: @@ -6600,6 +6604,7 @@ spec: glusterfs: description: |- glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md properties: endpoints: @@ -6659,7 +6664,7 @@ spec: The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath). + Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. properties: pullPolicy: @@ -6809,9 +6814,9 @@ spec: - claimName type: object photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host - machine + description: |- + photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. properties: fsType: description: |- @@ -6827,8 +6832,11 @@ spec: - pdID type: object portworxVolume: - description: portworxVolume represents a portworx volume - attached and mounted on kubelets host machine + description: |- + portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate + is on. properties: fsType: description: |- @@ -6911,8 +6919,6 @@ spec: - path type: object configMap: - description: configMap information about the - configMap data to project properties: items: items: @@ -6938,8 +6944,6 @@ spec: type: object x-kubernetes-map-type: atomic downwardAPI: - description: downwardAPI information about - the downwardAPI data to project properties: items: items: @@ -6982,8 +6986,6 @@ spec: x-kubernetes-list-type: atomic type: object secret: - description: secret information about the - secret data to project properties: items: items: @@ -7009,8 +7011,6 @@ spec: type: object x-kubernetes-map-type: atomic serviceAccountToken: - description: serviceAccountToken is information - about the serviceAccountToken data to project properties: audience: type: string @@ -7027,8 +7027,9 @@ spec: x-kubernetes-list-type: atomic type: object quobyte: - description: quobyte represents a Quobyte mount on the - host that shares a pod's lifetime + description: |- + quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. properties: group: description: |- @@ -7067,6 +7068,7 @@ spec: rbd: description: |- rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md properties: fsType: @@ -7139,8 +7141,9 @@ spec: - monitors type: object scaleIO: - description: scaleIO represents a ScaleIO persistent - volume attached and mounted on Kubernetes nodes. + description: |- + scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. properties: fsType: default: xfs @@ -7237,7 +7240,6 @@ spec: a volume. properties: key: - description: key is the key to project. type: string mode: format: int32 @@ -7261,8 +7263,9 @@ spec: type: string type: object storageos: - description: storageOS represents a StorageOS volume - attached and mounted on Kubernetes nodes. + description: |- + storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. properties: fsType: description: |- @@ -7307,8 +7310,10 @@ spec: type: string type: object vsphereVolume: - description: vsphereVolume represents a vSphere volume - attached and mounted on kubelets host machine + description: |- + vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + are redirected to the csi.vsphere.vmware.com CSI driver. properties: fsType: description: |- diff --git a/docs/stackset_crd.yaml b/docs/stackset_crd.yaml index 119ad20c..cad76bf0 100644 --- a/docs/stackset_crd.yaml +++ b/docs/stackset_crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.5 + controller-gen.kubebuilder.io/version: v0.18.0 name: stacksets.zalando.org spec: group: zalando.org @@ -349,7 +349,9 @@ spec: policies: description: |- policies is a list of potential scaling polices which can be used during scaling. - At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid + If not set, use the default values: + - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. + - For scale down: allow all pods to be removed in a 15s window. items: description: HPAScalingPolicy is a single policy which must hold true for a specified past @@ -393,6 +395,24 @@ spec: - For scale down: 300 (i.e. the stabilization window is 300 seconds long). format: int32 type: integer + tolerance: + anyOf: + - type: integer + - type: string + description: |- + tolerance is the tolerance on the ratio between the current and desired + metric value under which no updates are made to the desired number of + replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not + set, the default cluster-wide tolerance is applied (by default 10%). + + For example, if autoscaling is configured with a memory consumption target of 100Mi, + and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be + triggered when the actual consumption falls below 95Mi or exceeds 101Mi. + + This is an alpha field and requires enabling the HPAConfigurableTolerance + feature gate. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object scaleUp: description: |- @@ -405,7 +425,9 @@ spec: policies: description: |- policies is a list of potential scaling polices which can be used during scaling. - At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid + If not set, use the default values: + - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. + - For scale down: allow all pods to be removed in a 15s window. items: description: HPAScalingPolicy is a single policy which must hold true for a specified past @@ -449,6 +471,24 @@ spec: - For scale down: 300 (i.e. the stabilization window is 300 seconds long). format: int32 type: integer + tolerance: + anyOf: + - type: integer + - type: string + description: |- + tolerance is the tolerance on the ratio between the current and desired + metric value under which no updates are made to the desired number of + replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not + set, the default cluster-wide tolerance is applied (by default 10%). + + For example, if autoscaling is configured with a memory consumption target of 100Mi, + and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be + triggered when the actual consumption falls below 95Mi or exceeds 101Mi. + + This is an alpha field and requires enabling the HPAConfigurableTolerance + feature gate. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object type: object maxReplicas: @@ -1026,31 +1066,11 @@ spec: type: object x-kubernetes-map-type: atomic matchLabelKeys: - description: |- - 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 a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array x-kubernetes-list-type: atomic mismatchLabelKeys: - description: |- - 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 a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1098,12 +1118,6 @@ spec: type: array x-kubernetes-list-type: atomic topologyKey: - description: |- - 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. type: string required: - topologyKey @@ -1269,31 +1283,11 @@ spec: type: object x-kubernetes-map-type: atomic matchLabelKeys: - description: |- - 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 a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array x-kubernetes-list-type: atomic mismatchLabelKeys: - description: |- - 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 a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1341,12 +1335,6 @@ spec: type: array x-kubernetes-list-type: atomic topologyKey: - description: |- - 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. type: string required: - topologyKey @@ -1428,7 +1416,6 @@ spec: value is not empty. properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: type: string @@ -1468,8 +1455,6 @@ spec: type: object x-kubernetes-map-type: atomic secretKeyRef: - description: Selects a key of a secret - in the pod's namespace properties: key: type: string @@ -1500,7 +1485,7 @@ spec: Cannot be updated. items: description: EnvFromSource represents the - source of a set of ConfigMaps + source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -1509,14 +1494,12 @@ spec: default: "" type: string optional: - description: Specify whether the ConfigMap - must be defined type: boolean type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to - prepend to each key in the ConfigMap. + description: Optional text to prepend + to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: @@ -1526,8 +1509,6 @@ spec: default: "" type: string optional: - description: Specify whether the Secret - must be defined type: boolean type: object x-kubernetes-map-type: atomic @@ -1562,8 +1543,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action - to take. + description: Exec specifies a command + to execute in the container. properties: command: items: @@ -1572,8 +1553,8 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http - request to perform. + description: HTTPGet specifies an HTTP + GET request to perform. properties: host: type: string @@ -1603,9 +1584,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration - that the container should sleep before - being terminated. + description: Sleep represents a duration + that the container should sleep. properties: seconds: format: int64 @@ -1616,8 +1596,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -1643,8 +1623,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action - to take. + description: Exec specifies a command + to execute in the container. properties: command: items: @@ -1653,8 +1633,8 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http - request to perform. + description: HTTPGet specifies an HTTP + GET request to perform. properties: host: type: string @@ -1684,9 +1664,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration - that the container should sleep before - being terminated. + description: Sleep represents a duration + that the container should sleep. properties: seconds: format: int64 @@ -1697,8 +1676,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -1711,6 +1690,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -1720,16 +1705,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to - take. + description: Exec specifies a command to + execute in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -1742,8 +1721,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC @@ -1763,7 +1741,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -1827,8 +1805,8 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. + description: TCPSocket specifies a connection + to a TCP port. properties: host: description: 'Optional: Host name to @@ -1933,16 +1911,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to - take. + description: Exec specifies a command to + execute in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -1955,8 +1927,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC @@ -1976,7 +1947,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -2040,8 +2011,8 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. + description: TCPSocket specifies a connection + to a TCP port. properties: host: description: 'Optional: Host name to @@ -2226,16 +2197,12 @@ spec: add: description: Added capabilities items: - description: Capability represent - POSIX capabilities type type: string type: array x-kubernetes-list-type: atomic drop: description: Removed capabilities items: - description: Capability represent - POSIX capabilities type type: string type: array x-kubernetes-list-type: atomic @@ -2358,11 +2325,6 @@ spec: spec to use. type: string hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host Process' container. - All of a Pod's containers must have the same effective HostProcess value - (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). - In addition, if HostProcess is true then HostNetwork must also be set to true. type: boolean runAsUserName: description: |- @@ -2384,16 +2346,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to - take. + description: Exec specifies a command to + execute in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -2406,8 +2362,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC @@ -2427,7 +2382,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -2491,8 +2446,8 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. + description: TCPSocket specifies a connection + to a TCP port. properties: host: description: 'Optional: Host name to @@ -2707,9 +2662,13 @@ spec: resolver options of a pod. properties: name: - description: Required. + description: |- + Name is this DNS resolver option's name. + Required. type: string value: + description: Value is this DNS resolver + option's value. type: string type: object type: array @@ -2814,7 +2773,6 @@ spec: value is not empty. properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: type: string @@ -2854,8 +2812,6 @@ spec: type: object x-kubernetes-map-type: atomic secretKeyRef: - description: Selects a key of a secret - in the pod's namespace properties: key: type: string @@ -2886,7 +2842,7 @@ spec: Cannot be updated. items: description: EnvFromSource represents the - source of a set of ConfigMaps + source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -2895,14 +2851,12 @@ spec: default: "" type: string optional: - description: Specify whether the ConfigMap - must be defined type: boolean type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to - prepend to each key in the ConfigMap. + description: Optional text to prepend + to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: @@ -2912,8 +2866,6 @@ spec: default: "" type: string optional: - description: Specify whether the Secret - must be defined type: boolean type: object x-kubernetes-map-type: atomic @@ -2945,8 +2897,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action - to take. + description: Exec specifies a command + to execute in the container. properties: command: items: @@ -2955,8 +2907,8 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http - request to perform. + description: HTTPGet specifies an HTTP + GET request to perform. properties: host: type: string @@ -2986,9 +2938,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration - that the container should sleep before - being terminated. + description: Sleep represents a duration + that the container should sleep. properties: seconds: format: int64 @@ -2999,8 +2950,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -3026,8 +2977,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action - to take. + description: Exec specifies a command + to execute in the container. properties: command: items: @@ -3036,8 +2987,8 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http - request to perform. + description: HTTPGet specifies an HTTP + GET request to perform. properties: host: type: string @@ -3067,9 +3018,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration - that the container should sleep before - being terminated. + description: Sleep represents a duration + that the container should sleep. properties: seconds: format: int64 @@ -3080,8 +3030,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -3094,22 +3044,22 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: Probes are not allowed for ephemeral containers. properties: exec: - description: Exec specifies the action to - take. + description: Exec specifies a command to + execute in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3122,8 +3072,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC @@ -3143,7 +3092,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -3207,8 +3156,8 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. + description: TCPSocket specifies a connection + to a TCP port. properties: host: description: 'Optional: Host name to @@ -3303,16 +3252,10 @@ spec: containers. properties: exec: - description: Exec specifies the action to - take. + description: Exec specifies a command to + execute in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3325,8 +3268,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC @@ -3346,7 +3288,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -3410,8 +3352,8 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. + description: TCPSocket specifies a connection + to a TCP port. properties: host: description: 'Optional: Host name to @@ -3583,16 +3525,12 @@ spec: add: description: Added capabilities items: - description: Capability represent - POSIX capabilities type type: string type: array x-kubernetes-list-type: atomic drop: description: Removed capabilities items: - description: Capability represent - POSIX capabilities type type: string type: array x-kubernetes-list-type: atomic @@ -3715,11 +3653,6 @@ spec: spec to use. type: string hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host Process' container. - All of a Pod's containers must have the same effective HostProcess value - (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). - In addition, if HostProcess is true then HostNetwork must also be set to true. type: boolean runAsUserName: description: |- @@ -3735,16 +3668,10 @@ spec: containers. properties: exec: - description: Exec specifies the action to - take. + description: Exec specifies a command to + execute in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3757,8 +3684,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC @@ -3778,7 +3704,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -3842,8 +3768,8 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. + description: TCPSocket specifies a connection + to a TCP port. properties: host: description: 'Optional: Host name to @@ -4134,7 +4060,7 @@ spec: Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of - of that value or the sum of the normal containers. Limits are applied to init containers + that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. @@ -4201,7 +4127,6 @@ spec: value is not empty. properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: type: string @@ -4241,8 +4166,6 @@ spec: type: object x-kubernetes-map-type: atomic secretKeyRef: - description: Selects a key of a secret - in the pod's namespace properties: key: type: string @@ -4273,7 +4196,7 @@ spec: Cannot be updated. items: description: EnvFromSource represents the - source of a set of ConfigMaps + source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -4282,14 +4205,12 @@ spec: default: "" type: string optional: - description: Specify whether the ConfigMap - must be defined type: boolean type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to - prepend to each key in the ConfigMap. + description: Optional text to prepend + to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: @@ -4299,8 +4220,6 @@ spec: default: "" type: string optional: - description: Specify whether the Secret - must be defined type: boolean type: object x-kubernetes-map-type: atomic @@ -4335,8 +4254,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action - to take. + description: Exec specifies a command + to execute in the container. properties: command: items: @@ -4345,8 +4264,8 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http - request to perform. + description: HTTPGet specifies an HTTP + GET request to perform. properties: host: type: string @@ -4376,9 +4295,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration - that the container should sleep before - being terminated. + description: Sleep represents a duration + that the container should sleep. properties: seconds: format: int64 @@ -4389,8 +4307,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -4416,8 +4334,8 @@ spec: More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: - description: Exec specifies the action - to take. + description: Exec specifies a command + to execute in the container. properties: command: items: @@ -4426,8 +4344,8 @@ spec: x-kubernetes-list-type: atomic type: object httpGet: - description: HTTPGet specifies the http - request to perform. + description: HTTPGet specifies an HTTP + GET request to perform. properties: host: type: string @@ -4457,9 +4375,8 @@ spec: - port type: object sleep: - description: Sleep represents the duration - that the container should sleep before - being terminated. + description: Sleep represents a duration + that the container should sleep. properties: seconds: format: int64 @@ -4470,8 +4387,8 @@ spec: tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for the backward compatibility. There are no validation of this field and - lifecycle hooks will fail in runtime when tcp handler is specified. + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: type: string @@ -4484,6 +4401,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -4493,16 +4416,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to - take. + description: Exec specifies a command to + execute in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -4515,8 +4432,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC @@ -4536,7 +4452,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -4600,8 +4516,8 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. + description: TCPSocket specifies a connection + to a TCP port. properties: host: description: 'Optional: Host name to @@ -4706,16 +4622,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to - take. + description: Exec specifies a command to + execute in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -4728,8 +4638,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC @@ -4749,7 +4658,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -4813,8 +4722,8 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. + description: TCPSocket specifies a connection + to a TCP port. properties: host: description: 'Optional: Host name to @@ -4999,16 +4908,12 @@ spec: add: description: Added capabilities items: - description: Capability represent - POSIX capabilities type type: string type: array x-kubernetes-list-type: atomic drop: description: Removed capabilities items: - description: Capability represent - POSIX capabilities type type: string type: array x-kubernetes-list-type: atomic @@ -5131,11 +5036,6 @@ spec: spec to use. type: string hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host Process' container. - All of a Pod's containers must have the same effective HostProcess value - (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). - In addition, if HostProcess is true then HostNetwork must also be set to true. type: boolean runAsUserName: description: |- @@ -5157,16 +5057,10 @@ spec: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: exec: - description: Exec specifies the action to - take. + description: Exec specifies a command to + execute in the container. properties: command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -5179,8 +5073,7 @@ spec: format: int32 type: integer grpc: - description: GRPC specifies an action involving - a GRPC port. + description: GRPC specifies a GRPC HealthCheckRequest. properties: port: description: Port number of the gRPC @@ -5200,7 +5093,7 @@ spec: - port type: object httpGet: - description: HTTPGet specifies the http + description: HTTPGet specifies an HTTP GET request to perform. properties: host: @@ -5264,8 +5157,8 @@ spec: format: int32 type: integer tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. + description: TCPSocket specifies a connection + to a TCP port. properties: host: description: 'Optional: Host name to @@ -5633,6 +5526,75 @@ spec: x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map + resources: + description: |- + Resources is the total amount of CPU and Memory resources required by all + containers in the pod. It supports specifying Requests and Limits for + "cpu" and "memory" resource names only. ResourceClaims are not supported. + + This field enables fine-grained control over resource allocation for the + entire pod, allowing resource sharing among containers in a pod. + + This is an alpha field and requires enabling the PodLevelResources feature + gate. + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object restartPolicy: description: |- Restart policy for all containers within the pod. @@ -5757,6 +5719,32 @@ spec: Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer + seLinuxChangePolicy: + description: |- + seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + Valid values are "MountOption" and "Recursive". + + "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. + + "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + This requires all Pods that share the same volume to use the same SELinux label. + It is not possible to share the same volume among privileged and unprivileged Pods. + Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + CSIDriver instance. Other volumes are always re-labelled recursively. + "MountOption" value is allowed only when SELinuxMount feature gate is enabled. + + If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + and "Recursive" for all other volumes. + + This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. + + All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + Note that this field cannot be set when spec.os.name is windows. + type: string seLinuxOptions: description: |- The SELinux context to be applied to all containers. @@ -6085,7 +6073,6 @@ spec: - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string nodeTaintsPolicy: description: |- @@ -6096,7 +6083,6 @@ spec: - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string topologyKey: description: |- @@ -6155,6 +6141,8 @@ spec: description: |- awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore properties: fsType: @@ -6186,9 +6174,10 @@ spec: - volumeID type: object azureDisk: - description: azureDisk represents an Azure Data - Disk mount on the host and bind mount to the - pod. + description: |- + azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + are redirected to the disk.csi.azure.com CSI driver. properties: cachingMode: description: 'cachingMode is the Host Caching @@ -6227,9 +6216,10 @@ spec: - diskURI type: object azureFile: - description: azureFile represents an Azure File - Service mount on the host and bind mount to - the pod. + description: |- + azureFile represents an Azure File Service mount on the host and bind mount to the pod. + Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + are redirected to the file.csi.azure.com CSI driver. properties: readOnly: description: |- @@ -6250,8 +6240,9 @@ spec: - shareName type: object cephfs: - description: cephFS represents a Ceph FS mount - on the host that shares a pod's lifetime + description: |- + cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. properties: monitors: description: |- @@ -6304,6 +6295,8 @@ spec: cinder: description: |- cinder represents a cinder volume attached and mounted on kubelets host machine. + Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md properties: fsType: @@ -6372,7 +6365,6 @@ spec: within a volume. properties: key: - description: key is the key to project. type: string mode: format: int32 @@ -6403,7 +6395,7 @@ spec: csi: description: csi (Container Storage Interface) represents ephemeral storage that is handled - by certain external CSI drivers (Beta feature). + by certain external CSI drivers. properties: driver: description: |- @@ -6733,6 +6725,7 @@ spec: description: |- flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. properties: driver: description: driver is the name of the driver @@ -6778,10 +6771,9 @@ spec: - driver type: object flocker: - description: flocker represents a Flocker volume - attached to a kubelet's host machine. This - depends on the Flocker control service being - running + description: |- + flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. properties: datasetName: description: |- @@ -6798,6 +6790,8 @@ spec: description: |- gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk properties: fsType: @@ -6833,7 +6827,7 @@ spec: gitRepo: description: |- gitRepo represents a git repository at a particular revision. - DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an + Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. properties: @@ -6857,6 +6851,7 @@ spec: glusterfs: description: |- glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md properties: endpoints: @@ -6916,7 +6911,7 @@ spec: The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath). + Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. properties: pullPolicy: @@ -7068,9 +7063,9 @@ spec: - claimName type: object photonPersistentDisk: - description: photonPersistentDisk represents - a PhotonController persistent disk attached - and mounted on kubelets host machine + description: |- + photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. properties: fsType: description: |- @@ -7086,9 +7081,11 @@ spec: - pdID type: object portworxVolume: - description: portworxVolume represents a portworx - volume attached and mounted on kubelets host - machine + description: |- + portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate + is on. properties: fsType: description: |- @@ -7280,8 +7277,9 @@ spec: x-kubernetes-list-type: atomic type: object quobyte: - description: quobyte represents a Quobyte mount - on the host that shares a pod's lifetime + description: |- + quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. properties: group: description: |- @@ -7320,6 +7318,7 @@ spec: rbd: description: |- rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md properties: fsType: @@ -7392,9 +7391,9 @@ spec: - monitors type: object scaleIO: - description: scaleIO represents a ScaleIO persistent - volume attached and mounted on Kubernetes - nodes. + description: |- + scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. properties: fsType: default: xfs @@ -7494,7 +7493,6 @@ spec: within a volume. properties: key: - description: key is the key to project. type: string mode: format: int32 @@ -7518,9 +7516,9 @@ spec: type: string type: object storageos: - description: storageOS represents a StorageOS - volume attached and mounted on Kubernetes - nodes. + description: |- + storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. properties: fsType: description: |- @@ -7565,9 +7563,10 @@ spec: type: string type: object vsphereVolume: - description: vsphereVolume represents a vSphere - volume attached and mounted on kubelets host - machine + description: |- + vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + are redirected to the csi.vsphere.vmware.com CSI driver. properties: fsType: description: |- diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 213979e2..08db8f96 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -19,8 +19,8 @@ limitations under the License. package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" zalandov1 "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/typed/zalando.org/v1" discovery "k8s.io/client-go/discovery" diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index 508d20f6..32535e46 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -22,6 +22,7 @@ import ( clientset "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned" zalandov1 "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/typed/zalando.org/v1" fakezalandov1 "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/typed/zalando.org/v1/fake" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -49,9 +50,13 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + var opts metav1.ListOptions + if watchActcion, ok := action.(testing.WatchActionImpl); ok { + opts = watchActcion.ListOptions + } gvr := action.GetResource() ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) + watch, err := o.Watch(gvr, ns, opts) if err != nil { return false, nil, err } diff --git a/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_platformcredentialsset.go b/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_platformcredentialsset.go index 308189c6..87c16170 100644 --- a/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_platformcredentialsset.go +++ b/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_platformcredentialsset.go @@ -19,129 +19,34 @@ limitations under the License. package fake import ( - "context" - v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/typed/zalando.org/v1" + gentype "k8s.io/client-go/gentype" ) -// FakePlatformCredentialsSets implements PlatformCredentialsSetInterface -type FakePlatformCredentialsSets struct { +// fakePlatformCredentialsSets implements PlatformCredentialsSetInterface +type fakePlatformCredentialsSets struct { + *gentype.FakeClientWithList[*v1.PlatformCredentialsSet, *v1.PlatformCredentialsSetList] Fake *FakeZalandoV1 - ns string -} - -var platformcredentialssetsResource = v1.SchemeGroupVersion.WithResource("platformcredentialssets") - -var platformcredentialssetsKind = v1.SchemeGroupVersion.WithKind("PlatformCredentialsSet") - -// Get takes name of the platformCredentialsSet, and returns the corresponding platformCredentialsSet object, and an error if there is any. -func (c *FakePlatformCredentialsSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PlatformCredentialsSet, err error) { - emptyResult := &v1.PlatformCredentialsSet{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(platformcredentialssetsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.PlatformCredentialsSet), err -} - -// List takes label and field selectors, and returns the list of PlatformCredentialsSets that match those selectors. -func (c *FakePlatformCredentialsSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PlatformCredentialsSetList, err error) { - emptyResult := &v1.PlatformCredentialsSetList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(platformcredentialssetsResource, platformcredentialssetsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.PlatformCredentialsSetList{ListMeta: obj.(*v1.PlatformCredentialsSetList).ListMeta} - for _, item := range obj.(*v1.PlatformCredentialsSetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested platformCredentialsSets. -func (c *FakePlatformCredentialsSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(platformcredentialssetsResource, c.ns, opts)) - -} - -// Create takes the representation of a platformCredentialsSet and creates it. Returns the server's representation of the platformCredentialsSet, and an error, if there is any. -func (c *FakePlatformCredentialsSets) Create(ctx context.Context, platformCredentialsSet *v1.PlatformCredentialsSet, opts metav1.CreateOptions) (result *v1.PlatformCredentialsSet, err error) { - emptyResult := &v1.PlatformCredentialsSet{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(platformcredentialssetsResource, c.ns, platformCredentialsSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.PlatformCredentialsSet), err -} - -// Update takes the representation of a platformCredentialsSet and updates it. Returns the server's representation of the platformCredentialsSet, and an error, if there is any. -func (c *FakePlatformCredentialsSets) Update(ctx context.Context, platformCredentialsSet *v1.PlatformCredentialsSet, opts metav1.UpdateOptions) (result *v1.PlatformCredentialsSet, err error) { - emptyResult := &v1.PlatformCredentialsSet{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(platformcredentialssetsResource, c.ns, platformCredentialsSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.PlatformCredentialsSet), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePlatformCredentialsSets) UpdateStatus(ctx context.Context, platformCredentialsSet *v1.PlatformCredentialsSet, opts metav1.UpdateOptions) (result *v1.PlatformCredentialsSet, err error) { - emptyResult := &v1.PlatformCredentialsSet{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(platformcredentialssetsResource, "status", c.ns, platformCredentialsSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.PlatformCredentialsSet), err -} - -// Delete takes name of the platformCredentialsSet and deletes it. Returns an error if one occurs. -func (c *FakePlatformCredentialsSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(platformcredentialssetsResource, c.ns, name, opts), &v1.PlatformCredentialsSet{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakePlatformCredentialsSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(platformcredentialssetsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.PlatformCredentialsSetList{}) - return err -} - -// Patch applies the patch and returns the patched platformCredentialsSet. -func (c *FakePlatformCredentialsSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PlatformCredentialsSet, err error) { - emptyResult := &v1.PlatformCredentialsSet{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(platformcredentialssetsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakePlatformCredentialsSets(fake *FakeZalandoV1, namespace string) zalandoorgv1.PlatformCredentialsSetInterface { + return &fakePlatformCredentialsSets{ + gentype.NewFakeClientWithList[*v1.PlatformCredentialsSet, *v1.PlatformCredentialsSetList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("platformcredentialssets"), + v1.SchemeGroupVersion.WithKind("PlatformCredentialsSet"), + func() *v1.PlatformCredentialsSet { return &v1.PlatformCredentialsSet{} }, + func() *v1.PlatformCredentialsSetList { return &v1.PlatformCredentialsSetList{} }, + func(dst, src *v1.PlatformCredentialsSetList) { dst.ListMeta = src.ListMeta }, + func(list *v1.PlatformCredentialsSetList) []*v1.PlatformCredentialsSet { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.PlatformCredentialsSetList, items []*v1.PlatformCredentialsSet) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.PlatformCredentialsSet), err } diff --git a/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stack.go b/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stack.go index b4eef151..d1b62819 100644 --- a/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stack.go +++ b/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stack.go @@ -19,129 +19,30 @@ limitations under the License. package fake import ( - "context" - v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/typed/zalando.org/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeStacks implements StackInterface -type FakeStacks struct { +// fakeStacks implements StackInterface +type fakeStacks struct { + *gentype.FakeClientWithList[*v1.Stack, *v1.StackList] Fake *FakeZalandoV1 - ns string -} - -var stacksResource = v1.SchemeGroupVersion.WithResource("stacks") - -var stacksKind = v1.SchemeGroupVersion.WithKind("Stack") - -// Get takes name of the stack, and returns the corresponding stack object, and an error if there is any. -func (c *FakeStacks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Stack, err error) { - emptyResult := &v1.Stack{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(stacksResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Stack), err -} - -// List takes label and field selectors, and returns the list of Stacks that match those selectors. -func (c *FakeStacks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StackList, err error) { - emptyResult := &v1.StackList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(stacksResource, stacksKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.StackList{ListMeta: obj.(*v1.StackList).ListMeta} - for _, item := range obj.(*v1.StackList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested stacks. -func (c *FakeStacks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(stacksResource, c.ns, opts)) - -} - -// Create takes the representation of a stack and creates it. Returns the server's representation of the stack, and an error, if there is any. -func (c *FakeStacks) Create(ctx context.Context, stack *v1.Stack, opts metav1.CreateOptions) (result *v1.Stack, err error) { - emptyResult := &v1.Stack{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(stacksResource, c.ns, stack, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Stack), err -} - -// Update takes the representation of a stack and updates it. Returns the server's representation of the stack, and an error, if there is any. -func (c *FakeStacks) Update(ctx context.Context, stack *v1.Stack, opts metav1.UpdateOptions) (result *v1.Stack, err error) { - emptyResult := &v1.Stack{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(stacksResource, c.ns, stack, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Stack), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStacks) UpdateStatus(ctx context.Context, stack *v1.Stack, opts metav1.UpdateOptions) (result *v1.Stack, err error) { - emptyResult := &v1.Stack{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(stacksResource, "status", c.ns, stack, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Stack), err -} - -// Delete takes name of the stack and deletes it. Returns an error if one occurs. -func (c *FakeStacks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(stacksResource, c.ns, name, opts), &v1.Stack{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeStacks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(stacksResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.StackList{}) - return err -} - -// Patch applies the patch and returns the patched stack. -func (c *FakeStacks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Stack, err error) { - emptyResult := &v1.Stack{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(stacksResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeStacks(fake *FakeZalandoV1, namespace string) zalandoorgv1.StackInterface { + return &fakeStacks{ + gentype.NewFakeClientWithList[*v1.Stack, *v1.StackList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("stacks"), + v1.SchemeGroupVersion.WithKind("Stack"), + func() *v1.Stack { return &v1.Stack{} }, + func() *v1.StackList { return &v1.StackList{} }, + func(dst, src *v1.StackList) { dst.ListMeta = src.ListMeta }, + func(list *v1.StackList) []*v1.Stack { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.StackList, items []*v1.Stack) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Stack), err } diff --git a/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stackset.go b/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stackset.go index 49f7c134..7bf443f2 100644 --- a/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stackset.go +++ b/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stackset.go @@ -19,129 +19,30 @@ limitations under the License. package fake import ( - "context" - v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/typed/zalando.org/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeStackSets implements StackSetInterface -type FakeStackSets struct { +// fakeStackSets implements StackSetInterface +type fakeStackSets struct { + *gentype.FakeClientWithList[*v1.StackSet, *v1.StackSetList] Fake *FakeZalandoV1 - ns string -} - -var stacksetsResource = v1.SchemeGroupVersion.WithResource("stacksets") - -var stacksetsKind = v1.SchemeGroupVersion.WithKind("StackSet") - -// Get takes name of the stackSet, and returns the corresponding stackSet object, and an error if there is any. -func (c *FakeStackSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.StackSet, err error) { - emptyResult := &v1.StackSet{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(stacksetsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.StackSet), err -} - -// List takes label and field selectors, and returns the list of StackSets that match those selectors. -func (c *FakeStackSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StackSetList, err error) { - emptyResult := &v1.StackSetList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(stacksetsResource, stacksetsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.StackSetList{ListMeta: obj.(*v1.StackSetList).ListMeta} - for _, item := range obj.(*v1.StackSetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested stackSets. -func (c *FakeStackSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(stacksetsResource, c.ns, opts)) - -} - -// Create takes the representation of a stackSet and creates it. Returns the server's representation of the stackSet, and an error, if there is any. -func (c *FakeStackSets) Create(ctx context.Context, stackSet *v1.StackSet, opts metav1.CreateOptions) (result *v1.StackSet, err error) { - emptyResult := &v1.StackSet{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(stacksetsResource, c.ns, stackSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.StackSet), err -} - -// Update takes the representation of a stackSet and updates it. Returns the server's representation of the stackSet, and an error, if there is any. -func (c *FakeStackSets) Update(ctx context.Context, stackSet *v1.StackSet, opts metav1.UpdateOptions) (result *v1.StackSet, err error) { - emptyResult := &v1.StackSet{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(stacksetsResource, c.ns, stackSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.StackSet), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStackSets) UpdateStatus(ctx context.Context, stackSet *v1.StackSet, opts metav1.UpdateOptions) (result *v1.StackSet, err error) { - emptyResult := &v1.StackSet{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(stacksetsResource, "status", c.ns, stackSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.StackSet), err -} - -// Delete takes name of the stackSet and deletes it. Returns an error if one occurs. -func (c *FakeStackSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(stacksetsResource, c.ns, name, opts), &v1.StackSet{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeStackSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(stacksetsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.StackSetList{}) - return err -} - -// Patch applies the patch and returns the patched stackSet. -func (c *FakeStackSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StackSet, err error) { - emptyResult := &v1.StackSet{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(stacksetsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeStackSets(fake *FakeZalandoV1, namespace string) zalandoorgv1.StackSetInterface { + return &fakeStackSets{ + gentype.NewFakeClientWithList[*v1.StackSet, *v1.StackSetList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("stacksets"), + v1.SchemeGroupVersion.WithKind("StackSet"), + func() *v1.StackSet { return &v1.StackSet{} }, + func() *v1.StackSetList { return &v1.StackSetList{} }, + func(dst, src *v1.StackSetList) { dst.ListMeta = src.ListMeta }, + func(list *v1.StackSetList) []*v1.StackSet { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.StackSetList, items []*v1.StackSet) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.StackSet), err } diff --git a/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_zalando.org_client.go b/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_zalando.org_client.go index 5eacd9a9..086fa109 100644 --- a/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_zalando.org_client.go +++ b/pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_zalando.org_client.go @@ -29,15 +29,15 @@ type FakeZalandoV1 struct { } func (c *FakeZalandoV1) PlatformCredentialsSets(namespace string) v1.PlatformCredentialsSetInterface { - return &FakePlatformCredentialsSets{c, namespace} + return newFakePlatformCredentialsSets(c, namespace) } func (c *FakeZalandoV1) Stacks(namespace string) v1.StackInterface { - return &FakeStacks{c, namespace} + return newFakeStacks(c, namespace) } func (c *FakeZalandoV1) StackSets(namespace string) v1.StackSetInterface { - return &FakeStackSets{c, namespace} + return newFakeStackSets(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/client/clientset/versioned/typed/zalando.org/v1/platformcredentialsset.go b/pkg/client/clientset/versioned/typed/zalando.org/v1/platformcredentialsset.go index 43b8095a..9b1977dd 100644 --- a/pkg/client/clientset/versioned/typed/zalando.org/v1/platformcredentialsset.go +++ b/pkg/client/clientset/versioned/typed/zalando.org/v1/platformcredentialsset.go @@ -19,9 +19,9 @@ limitations under the License. package v1 import ( - "context" + context "context" - v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" scheme "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,33 +37,34 @@ type PlatformCredentialsSetsGetter interface { // PlatformCredentialsSetInterface has methods to work with PlatformCredentialsSet resources. type PlatformCredentialsSetInterface interface { - Create(ctx context.Context, platformCredentialsSet *v1.PlatformCredentialsSet, opts metav1.CreateOptions) (*v1.PlatformCredentialsSet, error) - Update(ctx context.Context, platformCredentialsSet *v1.PlatformCredentialsSet, opts metav1.UpdateOptions) (*v1.PlatformCredentialsSet, error) + Create(ctx context.Context, platformCredentialsSet *zalandoorgv1.PlatformCredentialsSet, opts metav1.CreateOptions) (*zalandoorgv1.PlatformCredentialsSet, error) + Update(ctx context.Context, platformCredentialsSet *zalandoorgv1.PlatformCredentialsSet, opts metav1.UpdateOptions) (*zalandoorgv1.PlatformCredentialsSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, platformCredentialsSet *v1.PlatformCredentialsSet, opts metav1.UpdateOptions) (*v1.PlatformCredentialsSet, error) + UpdateStatus(ctx context.Context, platformCredentialsSet *zalandoorgv1.PlatformCredentialsSet, opts metav1.UpdateOptions) (*zalandoorgv1.PlatformCredentialsSet, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PlatformCredentialsSet, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.PlatformCredentialsSetList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*zalandoorgv1.PlatformCredentialsSet, error) + List(ctx context.Context, opts metav1.ListOptions) (*zalandoorgv1.PlatformCredentialsSetList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PlatformCredentialsSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *zalandoorgv1.PlatformCredentialsSet, err error) PlatformCredentialsSetExpansion } // platformCredentialsSets implements PlatformCredentialsSetInterface type platformCredentialsSets struct { - *gentype.ClientWithList[*v1.PlatformCredentialsSet, *v1.PlatformCredentialsSetList] + *gentype.ClientWithList[*zalandoorgv1.PlatformCredentialsSet, *zalandoorgv1.PlatformCredentialsSetList] } // newPlatformCredentialsSets returns a PlatformCredentialsSets func newPlatformCredentialsSets(c *ZalandoV1Client, namespace string) *platformCredentialsSets { return &platformCredentialsSets{ - gentype.NewClientWithList[*v1.PlatformCredentialsSet, *v1.PlatformCredentialsSetList]( + gentype.NewClientWithList[*zalandoorgv1.PlatformCredentialsSet, *zalandoorgv1.PlatformCredentialsSetList]( "platformcredentialssets", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.PlatformCredentialsSet { return &v1.PlatformCredentialsSet{} }, - func() *v1.PlatformCredentialsSetList { return &v1.PlatformCredentialsSetList{} }), + func() *zalandoorgv1.PlatformCredentialsSet { return &zalandoorgv1.PlatformCredentialsSet{} }, + func() *zalandoorgv1.PlatformCredentialsSetList { return &zalandoorgv1.PlatformCredentialsSetList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/zalando.org/v1/stack.go b/pkg/client/clientset/versioned/typed/zalando.org/v1/stack.go index afa5a30a..82900b5f 100644 --- a/pkg/client/clientset/versioned/typed/zalando.org/v1/stack.go +++ b/pkg/client/clientset/versioned/typed/zalando.org/v1/stack.go @@ -19,9 +19,9 @@ limitations under the License. package v1 import ( - "context" + context "context" - v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" scheme "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,33 +37,34 @@ type StacksGetter interface { // StackInterface has methods to work with Stack resources. type StackInterface interface { - Create(ctx context.Context, stack *v1.Stack, opts metav1.CreateOptions) (*v1.Stack, error) - Update(ctx context.Context, stack *v1.Stack, opts metav1.UpdateOptions) (*v1.Stack, error) + Create(ctx context.Context, stack *zalandoorgv1.Stack, opts metav1.CreateOptions) (*zalandoorgv1.Stack, error) + Update(ctx context.Context, stack *zalandoorgv1.Stack, opts metav1.UpdateOptions) (*zalandoorgv1.Stack, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, stack *v1.Stack, opts metav1.UpdateOptions) (*v1.Stack, error) + UpdateStatus(ctx context.Context, stack *zalandoorgv1.Stack, opts metav1.UpdateOptions) (*zalandoorgv1.Stack, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Stack, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.StackList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*zalandoorgv1.Stack, error) + List(ctx context.Context, opts metav1.ListOptions) (*zalandoorgv1.StackList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Stack, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *zalandoorgv1.Stack, err error) StackExpansion } // stacks implements StackInterface type stacks struct { - *gentype.ClientWithList[*v1.Stack, *v1.StackList] + *gentype.ClientWithList[*zalandoorgv1.Stack, *zalandoorgv1.StackList] } // newStacks returns a Stacks func newStacks(c *ZalandoV1Client, namespace string) *stacks { return &stacks{ - gentype.NewClientWithList[*v1.Stack, *v1.StackList]( + gentype.NewClientWithList[*zalandoorgv1.Stack, *zalandoorgv1.StackList]( "stacks", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Stack { return &v1.Stack{} }, - func() *v1.StackList { return &v1.StackList{} }), + func() *zalandoorgv1.Stack { return &zalandoorgv1.Stack{} }, + func() *zalandoorgv1.StackList { return &zalandoorgv1.StackList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/zalando.org/v1/stackset.go b/pkg/client/clientset/versioned/typed/zalando.org/v1/stackset.go index c1e28bd7..79f062df 100644 --- a/pkg/client/clientset/versioned/typed/zalando.org/v1/stackset.go +++ b/pkg/client/clientset/versioned/typed/zalando.org/v1/stackset.go @@ -19,9 +19,9 @@ limitations under the License. package v1 import ( - "context" + context "context" - v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" scheme "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,33 +37,34 @@ type StackSetsGetter interface { // StackSetInterface has methods to work with StackSet resources. type StackSetInterface interface { - Create(ctx context.Context, stackSet *v1.StackSet, opts metav1.CreateOptions) (*v1.StackSet, error) - Update(ctx context.Context, stackSet *v1.StackSet, opts metav1.UpdateOptions) (*v1.StackSet, error) + Create(ctx context.Context, stackSet *zalandoorgv1.StackSet, opts metav1.CreateOptions) (*zalandoorgv1.StackSet, error) + Update(ctx context.Context, stackSet *zalandoorgv1.StackSet, opts metav1.UpdateOptions) (*zalandoorgv1.StackSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, stackSet *v1.StackSet, opts metav1.UpdateOptions) (*v1.StackSet, error) + UpdateStatus(ctx context.Context, stackSet *zalandoorgv1.StackSet, opts metav1.UpdateOptions) (*zalandoorgv1.StackSet, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.StackSet, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.StackSetList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*zalandoorgv1.StackSet, error) + List(ctx context.Context, opts metav1.ListOptions) (*zalandoorgv1.StackSetList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StackSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *zalandoorgv1.StackSet, err error) StackSetExpansion } // stackSets implements StackSetInterface type stackSets struct { - *gentype.ClientWithList[*v1.StackSet, *v1.StackSetList] + *gentype.ClientWithList[*zalandoorgv1.StackSet, *zalandoorgv1.StackSetList] } // newStackSets returns a StackSets func newStackSets(c *ZalandoV1Client, namespace string) *stackSets { return &stackSets{ - gentype.NewClientWithList[*v1.StackSet, *v1.StackSetList]( + gentype.NewClientWithList[*zalandoorgv1.StackSet, *zalandoorgv1.StackSetList]( "stacksets", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.StackSet { return &v1.StackSet{} }, - func() *v1.StackSetList { return &v1.StackSetList{} }), + func() *zalandoorgv1.StackSet { return &zalandoorgv1.StackSet{} }, + func() *zalandoorgv1.StackSetList { return &zalandoorgv1.StackSetList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/zalando.org/v1/zalando.org_client.go b/pkg/client/clientset/versioned/typed/zalando.org/v1/zalando.org_client.go index a8a1da15..35aaa18c 100644 --- a/pkg/client/clientset/versioned/typed/zalando.org/v1/zalando.org_client.go +++ b/pkg/client/clientset/versioned/typed/zalando.org/v1/zalando.org_client.go @@ -19,10 +19,10 @@ limitations under the License. package v1 import ( - "net/http" + http "net/http" - v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" - "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/scheme" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" + scheme "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -55,9 +55,7 @@ func (c *ZalandoV1Client) StackSets(namespace string) StackSetInterface { // where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*ZalandoV1Client, error) { config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } + setConfigDefaults(&config) httpClient, err := rest.HTTPClientFor(&config) if err != nil { return nil, err @@ -69,9 +67,7 @@ func NewForConfig(c *rest.Config) (*ZalandoV1Client, error) { // Note the http client provided takes precedence over the configured transport values. func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ZalandoV1Client, error) { config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } + setConfigDefaults(&config) client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err @@ -94,17 +90,15 @@ func New(c rest.Interface) *ZalandoV1Client { return &ZalandoV1Client{c} } -func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion +func setConfigDefaults(config *rest.Config) { + gv := zalandoorgv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } - - return nil } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index eda912cb..9b53319f 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -19,7 +19,7 @@ limitations under the License. package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/informers/externalversions/zalando.org/v1/platformcredentialsset.go b/pkg/client/informers/externalversions/zalando.org/v1/platformcredentialsset.go index 69c0ffd5..84111124 100644 --- a/pkg/client/informers/externalversions/zalando.org/v1/platformcredentialsset.go +++ b/pkg/client/informers/externalversions/zalando.org/v1/platformcredentialsset.go @@ -19,13 +19,13 @@ limitations under the License. package v1 import ( - "context" + context "context" time "time" - zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" + apiszalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" versioned "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned" internalinterfaces "github.com/zalando-incubator/stackset-controller/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/zalando-incubator/stackset-controller/pkg/client/listers/zalando.org/v1" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/client/listers/zalando.org/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -36,7 +36,7 @@ import ( // PlatformCredentialsSets. type PlatformCredentialsSetInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.PlatformCredentialsSetLister + Lister() zalandoorgv1.PlatformCredentialsSetLister } type platformCredentialsSetInformer struct { @@ -62,16 +62,28 @@ func NewFilteredPlatformCredentialsSetInformer(client versioned.Interface, names if tweakListOptions != nil { tweakListOptions(&options) } - return client.ZalandoV1().PlatformCredentialsSets(namespace).List(context.TODO(), options) + return client.ZalandoV1().PlatformCredentialsSets(namespace).List(context.Background(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ZalandoV1().PlatformCredentialsSets(namespace).Watch(context.TODO(), options) + return client.ZalandoV1().PlatformCredentialsSets(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ZalandoV1().PlatformCredentialsSets(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ZalandoV1().PlatformCredentialsSets(namespace).Watch(ctx, options) }, }, - &zalandoorgv1.PlatformCredentialsSet{}, + &apiszalandoorgv1.PlatformCredentialsSet{}, resyncPeriod, indexers, ) @@ -82,9 +94,9 @@ func (f *platformCredentialsSetInformer) defaultInformer(client versioned.Interf } func (f *platformCredentialsSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&zalandoorgv1.PlatformCredentialsSet{}, f.defaultInformer) + return f.factory.InformerFor(&apiszalandoorgv1.PlatformCredentialsSet{}, f.defaultInformer) } -func (f *platformCredentialsSetInformer) Lister() v1.PlatformCredentialsSetLister { - return v1.NewPlatformCredentialsSetLister(f.Informer().GetIndexer()) +func (f *platformCredentialsSetInformer) Lister() zalandoorgv1.PlatformCredentialsSetLister { + return zalandoorgv1.NewPlatformCredentialsSetLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/zalando.org/v1/stack.go b/pkg/client/informers/externalversions/zalando.org/v1/stack.go index f0664fdc..ab28e268 100644 --- a/pkg/client/informers/externalversions/zalando.org/v1/stack.go +++ b/pkg/client/informers/externalversions/zalando.org/v1/stack.go @@ -19,13 +19,13 @@ limitations under the License. package v1 import ( - "context" + context "context" time "time" - zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" + apiszalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" versioned "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned" internalinterfaces "github.com/zalando-incubator/stackset-controller/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/zalando-incubator/stackset-controller/pkg/client/listers/zalando.org/v1" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/client/listers/zalando.org/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -36,7 +36,7 @@ import ( // Stacks. type StackInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.StackLister + Lister() zalandoorgv1.StackLister } type stackInformer struct { @@ -62,16 +62,28 @@ func NewFilteredStackInformer(client versioned.Interface, namespace string, resy if tweakListOptions != nil { tweakListOptions(&options) } - return client.ZalandoV1().Stacks(namespace).List(context.TODO(), options) + return client.ZalandoV1().Stacks(namespace).List(context.Background(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ZalandoV1().Stacks(namespace).Watch(context.TODO(), options) + return client.ZalandoV1().Stacks(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ZalandoV1().Stacks(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ZalandoV1().Stacks(namespace).Watch(ctx, options) }, }, - &zalandoorgv1.Stack{}, + &apiszalandoorgv1.Stack{}, resyncPeriod, indexers, ) @@ -82,9 +94,9 @@ func (f *stackInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *stackInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&zalandoorgv1.Stack{}, f.defaultInformer) + return f.factory.InformerFor(&apiszalandoorgv1.Stack{}, f.defaultInformer) } -func (f *stackInformer) Lister() v1.StackLister { - return v1.NewStackLister(f.Informer().GetIndexer()) +func (f *stackInformer) Lister() zalandoorgv1.StackLister { + return zalandoorgv1.NewStackLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/zalando.org/v1/stackset.go b/pkg/client/informers/externalversions/zalando.org/v1/stackset.go index 6543b93d..9114f7ab 100644 --- a/pkg/client/informers/externalversions/zalando.org/v1/stackset.go +++ b/pkg/client/informers/externalversions/zalando.org/v1/stackset.go @@ -19,13 +19,13 @@ limitations under the License. package v1 import ( - "context" + context "context" time "time" - zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" + apiszalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" versioned "github.com/zalando-incubator/stackset-controller/pkg/client/clientset/versioned" internalinterfaces "github.com/zalando-incubator/stackset-controller/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/zalando-incubator/stackset-controller/pkg/client/listers/zalando.org/v1" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/client/listers/zalando.org/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -36,7 +36,7 @@ import ( // StackSets. type StackSetInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.StackSetLister + Lister() zalandoorgv1.StackSetLister } type stackSetInformer struct { @@ -62,16 +62,28 @@ func NewFilteredStackSetInformer(client versioned.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.ZalandoV1().StackSets(namespace).List(context.TODO(), options) + return client.ZalandoV1().StackSets(namespace).List(context.Background(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ZalandoV1().StackSets(namespace).Watch(context.TODO(), options) + return client.ZalandoV1().StackSets(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ZalandoV1().StackSets(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ZalandoV1().StackSets(namespace).Watch(ctx, options) }, }, - &zalandoorgv1.StackSet{}, + &apiszalandoorgv1.StackSet{}, resyncPeriod, indexers, ) @@ -82,9 +94,9 @@ func (f *stackSetInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *stackSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&zalandoorgv1.StackSet{}, f.defaultInformer) + return f.factory.InformerFor(&apiszalandoorgv1.StackSet{}, f.defaultInformer) } -func (f *stackSetInformer) Lister() v1.StackSetLister { - return v1.NewStackSetLister(f.Informer().GetIndexer()) +func (f *stackSetInformer) Lister() zalandoorgv1.StackSetLister { + return zalandoorgv1.NewStackSetLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/listers/zalando.org/v1/platformcredentialsset.go b/pkg/client/listers/zalando.org/v1/platformcredentialsset.go index 0323a47c..5924024e 100644 --- a/pkg/client/listers/zalando.org/v1/platformcredentialsset.go +++ b/pkg/client/listers/zalando.org/v1/platformcredentialsset.go @@ -19,10 +19,10 @@ limitations under the License. package v1 import ( - v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // PlatformCredentialsSetLister helps list PlatformCredentialsSets. @@ -30,7 +30,7 @@ import ( type PlatformCredentialsSetLister interface { // List lists all PlatformCredentialsSets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.PlatformCredentialsSet, err error) + List(selector labels.Selector) (ret []*zalandoorgv1.PlatformCredentialsSet, err error) // PlatformCredentialsSets returns an object that can list and get PlatformCredentialsSets. PlatformCredentialsSets(namespace string) PlatformCredentialsSetNamespaceLister PlatformCredentialsSetListerExpansion @@ -38,17 +38,17 @@ type PlatformCredentialsSetLister interface { // platformCredentialsSetLister implements the PlatformCredentialsSetLister interface. type platformCredentialsSetLister struct { - listers.ResourceIndexer[*v1.PlatformCredentialsSet] + listers.ResourceIndexer[*zalandoorgv1.PlatformCredentialsSet] } // NewPlatformCredentialsSetLister returns a new PlatformCredentialsSetLister. func NewPlatformCredentialsSetLister(indexer cache.Indexer) PlatformCredentialsSetLister { - return &platformCredentialsSetLister{listers.New[*v1.PlatformCredentialsSet](indexer, v1.Resource("platformcredentialsset"))} + return &platformCredentialsSetLister{listers.New[*zalandoorgv1.PlatformCredentialsSet](indexer, zalandoorgv1.Resource("platformcredentialsset"))} } // PlatformCredentialsSets returns an object that can list and get PlatformCredentialsSets. func (s *platformCredentialsSetLister) PlatformCredentialsSets(namespace string) PlatformCredentialsSetNamespaceLister { - return platformCredentialsSetNamespaceLister{listers.NewNamespaced[*v1.PlatformCredentialsSet](s.ResourceIndexer, namespace)} + return platformCredentialsSetNamespaceLister{listers.NewNamespaced[*zalandoorgv1.PlatformCredentialsSet](s.ResourceIndexer, namespace)} } // PlatformCredentialsSetNamespaceLister helps list and get PlatformCredentialsSets. @@ -56,15 +56,15 @@ func (s *platformCredentialsSetLister) PlatformCredentialsSets(namespace string) type PlatformCredentialsSetNamespaceLister interface { // List lists all PlatformCredentialsSets in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.PlatformCredentialsSet, err error) + List(selector labels.Selector) (ret []*zalandoorgv1.PlatformCredentialsSet, err error) // Get retrieves the PlatformCredentialsSet from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.PlatformCredentialsSet, error) + Get(name string) (*zalandoorgv1.PlatformCredentialsSet, error) PlatformCredentialsSetNamespaceListerExpansion } // platformCredentialsSetNamespaceLister implements the PlatformCredentialsSetNamespaceLister // interface. type platformCredentialsSetNamespaceLister struct { - listers.ResourceIndexer[*v1.PlatformCredentialsSet] + listers.ResourceIndexer[*zalandoorgv1.PlatformCredentialsSet] } diff --git a/pkg/client/listers/zalando.org/v1/stack.go b/pkg/client/listers/zalando.org/v1/stack.go index c7bee39c..ac514ebf 100644 --- a/pkg/client/listers/zalando.org/v1/stack.go +++ b/pkg/client/listers/zalando.org/v1/stack.go @@ -19,10 +19,10 @@ limitations under the License. package v1 import ( - v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // StackLister helps list Stacks. @@ -30,7 +30,7 @@ import ( type StackLister interface { // List lists all Stacks in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Stack, err error) + List(selector labels.Selector) (ret []*zalandoorgv1.Stack, err error) // Stacks returns an object that can list and get Stacks. Stacks(namespace string) StackNamespaceLister StackListerExpansion @@ -38,17 +38,17 @@ type StackLister interface { // stackLister implements the StackLister interface. type stackLister struct { - listers.ResourceIndexer[*v1.Stack] + listers.ResourceIndexer[*zalandoorgv1.Stack] } // NewStackLister returns a new StackLister. func NewStackLister(indexer cache.Indexer) StackLister { - return &stackLister{listers.New[*v1.Stack](indexer, v1.Resource("stack"))} + return &stackLister{listers.New[*zalandoorgv1.Stack](indexer, zalandoorgv1.Resource("stack"))} } // Stacks returns an object that can list and get Stacks. func (s *stackLister) Stacks(namespace string) StackNamespaceLister { - return stackNamespaceLister{listers.NewNamespaced[*v1.Stack](s.ResourceIndexer, namespace)} + return stackNamespaceLister{listers.NewNamespaced[*zalandoorgv1.Stack](s.ResourceIndexer, namespace)} } // StackNamespaceLister helps list and get Stacks. @@ -56,15 +56,15 @@ func (s *stackLister) Stacks(namespace string) StackNamespaceLister { type StackNamespaceLister interface { // List lists all Stacks in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Stack, err error) + List(selector labels.Selector) (ret []*zalandoorgv1.Stack, err error) // Get retrieves the Stack from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Stack, error) + Get(name string) (*zalandoorgv1.Stack, error) StackNamespaceListerExpansion } // stackNamespaceLister implements the StackNamespaceLister // interface. type stackNamespaceLister struct { - listers.ResourceIndexer[*v1.Stack] + listers.ResourceIndexer[*zalandoorgv1.Stack] } diff --git a/pkg/client/listers/zalando.org/v1/stackset.go b/pkg/client/listers/zalando.org/v1/stackset.go index eb501742..e1027dd2 100644 --- a/pkg/client/listers/zalando.org/v1/stackset.go +++ b/pkg/client/listers/zalando.org/v1/stackset.go @@ -19,10 +19,10 @@ limitations under the License. package v1 import ( - v1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + zalandoorgv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // StackSetLister helps list StackSets. @@ -30,7 +30,7 @@ import ( type StackSetLister interface { // List lists all StackSets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.StackSet, err error) + List(selector labels.Selector) (ret []*zalandoorgv1.StackSet, err error) // StackSets returns an object that can list and get StackSets. StackSets(namespace string) StackSetNamespaceLister StackSetListerExpansion @@ -38,17 +38,17 @@ type StackSetLister interface { // stackSetLister implements the StackSetLister interface. type stackSetLister struct { - listers.ResourceIndexer[*v1.StackSet] + listers.ResourceIndexer[*zalandoorgv1.StackSet] } // NewStackSetLister returns a new StackSetLister. func NewStackSetLister(indexer cache.Indexer) StackSetLister { - return &stackSetLister{listers.New[*v1.StackSet](indexer, v1.Resource("stackset"))} + return &stackSetLister{listers.New[*zalandoorgv1.StackSet](indexer, zalandoorgv1.Resource("stackset"))} } // StackSets returns an object that can list and get StackSets. func (s *stackSetLister) StackSets(namespace string) StackSetNamespaceLister { - return stackSetNamespaceLister{listers.NewNamespaced[*v1.StackSet](s.ResourceIndexer, namespace)} + return stackSetNamespaceLister{listers.NewNamespaced[*zalandoorgv1.StackSet](s.ResourceIndexer, namespace)} } // StackSetNamespaceLister helps list and get StackSets. @@ -56,15 +56,15 @@ func (s *stackSetLister) StackSets(namespace string) StackSetNamespaceLister { type StackSetNamespaceLister interface { // List lists all StackSets in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.StackSet, err error) + List(selector labels.Selector) (ret []*zalandoorgv1.StackSet, err error) // Get retrieves the StackSet from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.StackSet, error) + Get(name string) (*zalandoorgv1.StackSet, error) StackSetNamespaceListerExpansion } // stackSetNamespaceLister implements the StackSetNamespaceLister // interface. type stackSetNamespaceLister struct { - listers.ResourceIndexer[*v1.StackSet] + listers.ResourceIndexer[*zalandoorgv1.StackSet] }