From 9e9fbdfd1cc823cf7708a48a506e7381dd45e4e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Ho=C3=9F?= Date: Wed, 29 Nov 2023 21:45:31 +0100 Subject: [PATCH] add theketchio/ketch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sebastian Hoß --- .reuse/dep5 | 4 + code-generator/src/catalog.rs | 8 + .../ketch/theketch.io/v1beta1/apps.yaml | 1916 +++++++++++++++++ .../ketch/theketch.io/v1beta1/jobs.yaml | 140 ++ dev/Containerfile | 2 +- kube-custom-resources-rs/Cargo.toml | 1 + kube-custom-resources-rs/src/lib.rs | 9 + .../src/theketch_io/mod.rs | 1 + .../src/theketch_io/v1beta1/apps.rs | 1891 ++++++++++++++++ .../src/theketch_io/v1beta1/jobs.rs | 94 + .../src/theketch_io/v1beta1/mod.rs | 2 + 11 files changed, 4067 insertions(+), 1 deletion(-) create mode 100644 crd-catalog/theketchio/ketch/theketch.io/v1beta1/apps.yaml create mode 100644 crd-catalog/theketchio/ketch/theketch.io/v1beta1/jobs.yaml create mode 100644 kube-custom-resources-rs/src/theketch_io/mod.rs create mode 100644 kube-custom-resources-rs/src/theketch_io/v1beta1/apps.rs create mode 100644 kube-custom-resources-rs/src/theketch_io/v1beta1/jobs.rs create mode 100644 kube-custom-resources-rs/src/theketch_io/v1beta1/mod.rs diff --git a/.reuse/dep5 b/.reuse/dep5 index 3f9d1fb46..5d7b49dd3 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -827,6 +827,10 @@ Files: crd-catalog/tektoncd/operator/* Copyright: The tektoncd/operator Authors License: Apache-2.0 +Files: crd-catalog/theketchio/ketch/* +Copyright: The theketchio/ketch Authors +License: Apache-2.0 + Files: crd-catalog/traefik/traefik/* Copyright: The traefik/traefik Authors License: MIT diff --git a/code-generator/src/catalog.rs b/code-generator/src/catalog.rs index cc5910868..a258247ec 100644 --- a/code-generator/src/catalog.rs +++ b/code-generator/src/catalog.rs @@ -2197,6 +2197,14 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[ "https://github.com/tektoncd/operator/blob/main/config/base/300-operator_v1alpha1_trigger_crd.yaml", ], }, + UpstreamSource { + project_name: "theketchio/ketch", + license: APACHE_V2, + urls: &[ + "https://github.com/theketchio/ketch/blob/main/config/crd/bases/theketch.io_apps.yaml", + "https://github.com/theketchio/ketch/blob/main/config/crd/bases/theketch.io_jobs.yaml", + ], + }, UpstreamSource { project_name: "traefik/traefik", license: MIT, diff --git a/crd-catalog/theketchio/ketch/theketch.io/v1beta1/apps.yaml b/crd-catalog/theketchio/ketch/theketch.io/v1beta1/apps.yaml new file mode 100644 index 000000000..1775dfee2 --- /dev/null +++ b/crd-catalog/theketchio/ketch/theketch.io/v1beta1/apps.yaml @@ -0,0 +1,1916 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + name: apps.theketch.io +spec: + group: theketch.io + names: + kind: App + listKind: AppList + plural: apps + singular: app + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.description + name: Description + type: string + name: v1beta1 + schema: + openAPIV3Schema: + description: App is the Schema for the apps API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: AppSpec defines the desired state of App. + properties: + annotations: + description: Annotations is a list of annotations that will be applied to Services/Deployments/Pods/Gateways/Ingresses/IngressRoutes. + items: + description: MetadataItem represent a request to add label/annotations to processes + properties: + apply: + additionalProperties: + type: string + type: object + deploymentVersion: + type: integer + processName: + type: string + target: + properties: + apiVersion: + type: string + kind: + type: string + type: object + type: object + type: array + buildPacks: + description: BuildPacks is a list of build packs to use when building from source. + items: + type: string + type: array + builder: + description: Builder is the name of the builder used to build source code. + type: string + canary: + description: Canary contains a configuration which will be required for canary deployments. + properties: + active: + description: Active shows if canary deployment is active for this application. + type: boolean + currentStep: + description: CurrentStep is the count for current step for a canary deployment. + maximum: 100.0 + minimum: 0.0 + type: integer + nextScheduledTime: + description: NextScheduledTime holds time of the next step. + format: date-time + type: string + started: + description: Started holds time when canary started + format: date-time + type: string + stepTimeInterval: + description: A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years. + format: int64 + type: integer + stepWeight: + maximum: 100.0 + minimum: 0.0 + type: integer + steps: + maximum: 100.0 + minimum: 0.0 + type: integer + target: + additionalProperties: + type: integer + description: Target map of processes and target units value + type: object + type: object + deployments: + description: Deployments is a list of running deployments. + items: + properties: + exposedPorts: + items: + description: ExposedPort represents a port exposed by a docker image. Native format is "port/PROTOCOL" string, we parse it and keep it as ExposedPort. + properties: + port: + type: integer + protocol: + type: string + required: + - port + - protocol + type: object + type: array + image: + type: string + imagePullSecrets: + description: ImagePullSecrets contains a list of secrets to pull the image of this deployment. If this list is defined, app.Spec.DockerRegistrySpec is not used. + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + ketchYaml: + description: KetchYamlData describes certain aspects of the application deployment being deployed. + properties: + healthcheck: + description: Healthcheck describes readiness and liveness probes of the application deployment. + properties: + livenessProbe: + description: 'Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + 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 + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + 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: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + readinessProbe: + description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + 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 + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + 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: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + 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 + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + 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: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + type: object + hooks: + description: Hooks allow to run commands during different stages of the application deployment. + properties: + restart: + description: Restart describes commands to run during different stages of the application deployment. + properties: + after: + description: Before contains commands that are executed after a unit is restarted. Commands listed in this hook run once per unit. + items: + type: string + type: array + before: + description: Before contains commands that are executed before a unit is restarted. Commands listed in this hook run once per unit. + items: + type: string + type: array + type: object + type: object + kubernetes: + description: Kubernetes contains specific configurations for Kubernetes. + properties: + processes: + additionalProperties: + description: KetchYamlKubernetesConfig contains specific configurations of a process. + properties: + ports: + items: + description: KetchYamlKubernetesConfig contains configuration of an exposed port. + properties: + name: + description: Name is a descriptive name for the port. This field is optional. + type: string + port: + description: Port is the port that will be exposed on a Kubernetes service. If omitted, the target_port value is used. + type: integer + protocol: + description: Protocol defines the port protocol. The accepted values are TCP and UDP. + type: string + target_port: + description: TargetPort is the port that the process is listening on. If omitted, the port value is used. + type: integer + type: object + type: array + type: object + description: Processes configure which ports are exposed on each process of the application deployment. + type: object + type: object + type: object + labels: + items: + description: Label represents an environment variable present in an application. + properties: + name: + description: Name of the label. + minLength: 1 + type: string + value: + description: Value of the label. + type: string + required: + - name + - value + type: object + type: array + processes: + items: + description: ProcessSpec is a specification of the desired behavior of a process. + properties: + cmd: + description: Commands executed on startup. + items: + type: string + type: array + env: + description: Env is a list of environment variables to set in pods created for the process. + items: + description: Env represents an environment variable present in an application. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + minLength: 1 + type: string + value: + description: Value of the environment variable. + type: string + required: + - name + - value + type: object + type: array + name: + description: Name of the process. + minLength: 1 + type: string + resources: + description: ResourceRequirements describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n 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 + 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 + securityContext: + description: Security options the process should run with. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential 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: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + units: + description: Units is a number of replicas of the process. + type: integer + volumeMounts: + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'cachingMode is the Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in the blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the blob storage + type: string + fsType: + description: fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: azureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: cephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + properties: + driver: + description: driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'emptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'medium represents what type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + 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 + ephemeral: + description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. \n A pod can use both types of ephemeral volumes and persistent volumes at the same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). \n An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. \n This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. + type: object + spec: + description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. + properties: + accessModes: + description: 'accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn''t specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn''t set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + namespace: + description: Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n 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 + 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 + selector: + description: selector is a label query over volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that 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: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: driver is the name of the driver to use for this volume. + type: string + fsType: + description: fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field holds extra command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - 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 + properties: + datasetName: + description: datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + 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 EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'iscsi represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'nfs represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: readOnly Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: pdID is the ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: portworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: sources is the list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: configMap information about the configMap data to project + properties: + items: + description: items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: downwardAPI information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret data to project + properties: + items: + description: items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional field specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: serviceAccountToken is information about the serviceAccountToken data to project + properties: + audience: + description: audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: group to map volume access to Default is no group + type: string + readOnly: + description: readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: user to map volume access to Defaults to serivceaccount user + type: string + volume: + description: volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'rbd represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: gateway is the host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: system is the name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: optional field specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'secretName is the name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + required: + - cmd + - name + type: object + type: array + routingSettings: + description: RoutingSettings contains a weight of the current deployment used to route incoming traffic. If an application has two deployments with corresponding weights of 30 and 70, then 3 of 10 incoming requests will be sent to the first deployment (approximately). + properties: + weight: + type: integer + required: + - weight + type: object + version: + type: integer + required: + - image + - version + type: object + type: array + deploymentsCount: + description: DeploymentsCount is incremented every time a new deployment is added to Deployments and used as a version for new deployments. + type: integer + description: + maxLength: 140 + type: string + dockerRegistry: + description: DockerRegistry contains docker registry configuration of the application. + properties: + secretName: + description: SecretName is added to the "imagePullSecrets" list of each application pod. + type: string + type: object + env: + description: List of environment variables of the application. + items: + description: Env represents an environment variable present in an application. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + minLength: 1 + type: string + value: + description: Value of the environment variable. + type: string + required: + - name + - value + type: object + type: array + extensions: + description: Extensions can be used by third-parties to keep additional information. + items: + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + id: + description: ID is an additional unique identifier of this application besides the app's name if needed. Ketch internally doesn't rely on this field, so it can be anything useful for a user. Ketch uses either this ID or the app name and adds "app=" label to all pods. ID is preferred and used if set, otherwise the label will be "app=". Thus, istio time series will have "destination_app=" label. + type: string + ingress: + description: Ingress contains configuration of entrypoints to access the application. + properties: + cnames: + description: Cnames is a list of additional cnames. + items: + description: Cname represents a DNS record and whether the record use TLS. + properties: + name: + type: string + secretName: + description: SecretName if provided must contain an SSL certificate that will be used to serve this cname. Currently, the secret must be in the app's namespace. + type: string + secure: + type: boolean + required: + - name + - secure + type: object + type: array + controller: + description: Controller is the ingress controller the app is using + properties: + className: + type: string + clusterIssuer: + type: string + serviceEndpoint: + type: string + type: + description: IngressControllerType is a type of an ingress controller. + type: string + type: object + generateDefaultCname: + description: GenerateDefaultCname if set the application will have a default cname ..shipa.cloud. + type: boolean + required: + - generateDefaultCname + type: object + labels: + description: Labels is a list of labels that will be applied to Services/Deployments/Pods. + items: + description: MetadataItem represent a request to add label/annotations to processes + properties: + apply: + additionalProperties: + type: string + type: object + deploymentVersion: + type: integer + processName: + type: string + target: + properties: + apiVersion: + type: string + kind: + type: string + type: object + type: object + type: array + namespace: + description: Namespace sets the namespace in which the app is run + type: string + securityContext: + description: SecurityContext specifies security settings for a pod/app, which get applied to all containers. + properties: + fsGroup: + description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: \n 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- \n If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows." + format: int64 + type: integer + fsGroupChangePolicy: + description: 'fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. Note that this field cannot be set when spec.os.name is windows.' + type: string + runAsGroup: + description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in the container image for the uid of the container process. If unspecified, no additional groups are added to any container. Note that group memberships defined in the container image for the uid of the container process are still effective, even if they are not included in this list. Note that this field cannot be set when spec.os.name is windows. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential 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: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + serviceAccountName: + description: ServiceAccountName specifies a service account name to be used for this application. + type: string + type: + description: Type specifies whether an app should be a deployment or a statefulset + enum: + - Deployment + - StatefulSet + type: string + version: + type: string + volumeClaimTemplates: + description: VolumeClaimTemplates is a list of an app's volumeClaimTemplates + items: + properties: + accessModes: + items: + type: string + type: array + name: + type: string + storage: + type: string + storageClassName: + type: string + required: + - accessModes + - name + - storage + type: object + type: array + required: + - deployments + - ingress + - namespace + type: object + status: + description: AppStatus represents information about the status of an application. + properties: + conditions: + description: Conditions of App resource. + items: + description: Condition contains details for the current condition of this app. + properties: + lastTransitionTime: + description: LastTransitionTime is the timestamp corresponding to the last status. + format: date-time + type: string + message: + description: A human readable message indicating details about why the application is in this condition. + type: string + status: + description: Status of the condition. + type: string + type: + description: Type of the condition. + type: string + required: + - status + - type + type: object + type: array + extensionsStatuses: + description: ExtensionsStatuses can be used by third-parties to keep additional information. + items: + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] diff --git a/crd-catalog/theketchio/ketch/theketch.io/v1beta1/jobs.yaml b/crd-catalog/theketchio/ketch/theketch.io/v1beta1/jobs.yaml new file mode 100644 index 000000000..7a6da0b30 --- /dev/null +++ b/crd-catalog/theketchio/ketch/theketch.io/v1beta1/jobs.yaml @@ -0,0 +1,140 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + name: jobs.theketch.io +spec: + group: theketch.io + names: + kind: Job + listKind: JobList + plural: jobs + singular: job + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Job is the Schema for the jobs API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: JobSpec defines the desired state of Job + properties: + backoffLimit: + minimum: 0.0 + type: integer + completions: + type: integer + containers: + items: + description: Container represents a single container run in a Job + properties: + command: + items: + type: string + type: array + image: + type: string + name: + type: string + required: + - command + - image + - name + type: object + type: array + description: + type: string + failedJobsHistoryLimit: + type: integer + name: + type: string + namespace: + type: string + parallelism: + type: integer + policy: + description: Policy represents the policy types a job can have + properties: + concurrencyPolicy: + description: CronJob-specific + type: string + restartPolicy: + description: RestartPolicy describes how the container should be restarted. Only one of the following restart policies may be specified. If none of the following policies is specified, the default one is RestartPolicyAlways. + type: string + type: object + schedule: + description: CronJob-specific + type: string + startingDeadlineSeconds: + type: integer + successfulJobsHistoryLimit: + type: integer + suspend: + type: boolean + type: + type: string + version: + type: string + required: + - name + - namespace + - type + type: object + status: + description: JobStatus defines the observed state of Job + properties: + active: + description: CronJob-specific + type: boolean + conditions: + items: + description: Condition contains details for the current condition of this app. + properties: + lastTransitionTime: + description: LastTransitionTime is the timestamp corresponding to the last status. + format: date-time + type: string + message: + description: A human readable message indicating details about why the application is in this condition. + type: string + status: + description: Status of the condition. + type: string + type: + description: Type of the condition. + type: string + required: + - status + - type + type: object + type: array + lastScheduleTime: + format: date-time + type: string + lastSuccessfulTime: + format: date-time + type: string + required: + - active + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] diff --git a/dev/Containerfile b/dev/Containerfile index 35434774c..e807e9114 100644 --- a/dev/Containerfile +++ b/dev/Containerfile @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: The kube-custom-resources-rs Authors # SPDX-License-Identifier: 0BSD -FROM docker.io/mikefarah/yq:4.35.2 AS yq +FROM docker.io/mikefarah/yq:latest AS yq FROM docker.io/metio/devcontainers-rust:latest COPY --from=yq /usr/bin/yq /usr/bin/yq diff --git a/kube-custom-resources-rs/Cargo.toml b/kube-custom-resources-rs/Cargo.toml index 83c0f19d0..712e36363 100644 --- a/kube-custom-resources-rs/Cargo.toml +++ b/kube-custom-resources-rs/Cargo.toml @@ -277,6 +277,7 @@ stunner_l7mp_io = [] submariner_io = [] templates_gatekeeper_sh = [] tests_testkube_io = [] +theketch_io = [] topology_node_k8s_io = [] topolvm_cybozu_com = [] traefik_io = [] diff --git a/kube-custom-resources-rs/src/lib.rs b/kube-custom-resources-rs/src/lib.rs index 1ca0d87b2..f696715a7 100644 --- a/kube-custom-resources-rs/src/lib.rs +++ b/kube-custom-resources-rs/src/lib.rs @@ -2533,6 +2533,13 @@ Every group has its own feature in this crate. The available features are as fol - `Test` - `TestSuite` +## theketch_io + +- apiVersion: `theketch.io/v1beta1` +- kinds: + - `App` + - `Job` + ## topology_node_k8s_io - apiVersion: `topology.node.k8s.io/v1alpha1` @@ -3134,6 +3141,8 @@ pub mod submariner_io; pub mod templates_gatekeeper_sh; #[cfg(feature = "tests_testkube_io")] pub mod tests_testkube_io; +#[cfg(feature = "theketch_io")] +pub mod theketch_io; #[cfg(feature = "topology_node_k8s_io")] pub mod topology_node_k8s_io; #[cfg(feature = "topolvm_cybozu_com")] diff --git a/kube-custom-resources-rs/src/theketch_io/mod.rs b/kube-custom-resources-rs/src/theketch_io/mod.rs new file mode 100644 index 000000000..9f64fc82d --- /dev/null +++ b/kube-custom-resources-rs/src/theketch_io/mod.rs @@ -0,0 +1 @@ +pub mod v1beta1; diff --git a/kube-custom-resources-rs/src/theketch_io/v1beta1/apps.rs b/kube-custom-resources-rs/src/theketch_io/v1beta1/apps.rs new file mode 100644 index 000000000..608f36d27 --- /dev/null +++ b/kube-custom-resources-rs/src/theketch_io/v1beta1/apps.rs @@ -0,0 +1,1891 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/theketchio/ketch/theketch.io/v1beta1/apps.yaml --derive=Default --derive=PartialEq +// kopium version: 0.16.2 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; +use std::collections::BTreeMap; +use k8s_openapi::apimachinery::pkg::util::intstr::IntOrString; + +/// AppSpec defines the desired state of App. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "theketch.io", version = "v1beta1", kind = "App", plural = "apps")] +#[kube(status = "AppStatus")] +#[kube(schema = "disabled")] +pub struct AppSpec { + /// Annotations is a list of annotations that will be applied to Services/Deployments/Pods/Gateways/Ingresses/IngressRoutes. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub annotations: Option>, + /// BuildPacks is a list of build packs to use when building from source. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "buildPacks")] + pub build_packs: Option>, + /// Builder is the name of the builder used to build source code. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub builder: Option, + /// Canary contains a configuration which will be required for canary deployments. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub canary: Option, + /// Deployments is a list of running deployments. + pub deployments: Vec, + /// DeploymentsCount is incremented every time a new deployment is added to Deployments and used as a version for new deployments. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "deploymentsCount")] + pub deployments_count: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub description: Option, + /// DockerRegistry contains docker registry configuration of the application. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "dockerRegistry")] + pub docker_registry: Option, + /// List of environment variables of the application. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub env: Option>, + /// Extensions can be used by third-parties to keep additional information. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub extensions: Option>, + /// ID is an additional unique identifier of this application besides the app's name if needed. Ketch internally doesn't rely on this field, so it can be anything useful for a user. Ketch uses either this ID or the app name and adds "app=" label to all pods. ID is preferred and used if set, otherwise the label will be "app=". Thus, istio time series will have "destination_app=" label. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub id: Option, + /// Ingress contains configuration of entrypoints to access the application. + pub ingress: AppIngress, + /// Labels is a list of labels that will be applied to Services/Deployments/Pods. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + /// Namespace sets the namespace in which the app is run + pub namespace: String, + /// SecurityContext specifies security settings for a pod/app, which get applied to all containers. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "securityContext")] + pub security_context: Option, + /// ServiceAccountName specifies a service account name to be used for this application. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountName")] + pub service_account_name: Option, + /// Type specifies whether an app should be a deployment or a statefulset + #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] + pub r#type: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub version: Option, + /// VolumeClaimTemplates is a list of an app's volumeClaimTemplates + #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeClaimTemplates")] + pub volume_claim_templates: Option>, +} + +/// MetadataItem represent a request to add label/annotations to processes +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppAnnotations { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub apply: Option>, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "deploymentVersion")] + pub deployment_version: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "processName")] + pub process_name: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub target: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppAnnotationsTarget { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")] + pub api_version: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub kind: Option, +} + +/// Canary contains a configuration which will be required for canary deployments. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppCanary { + /// Active shows if canary deployment is active for this application. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub active: Option, + /// CurrentStep is the count for current step for a canary deployment. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "currentStep")] + pub current_step: Option, + /// NextScheduledTime holds time of the next step. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "nextScheduledTime")] + pub next_scheduled_time: Option, + /// Started holds time when canary started + #[serde(default, skip_serializing_if = "Option::is_none")] + pub started: Option, + /// A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "stepTimeInterval")] + pub step_time_interval: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "stepWeight")] + pub step_weight: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub steps: Option, + /// Target map of processes and target units value + #[serde(default, skip_serializing_if = "Option::is_none")] + pub target: Option>, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeployments { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "exposedPorts")] + pub exposed_ports: Option>, + pub image: String, + /// ImagePullSecrets contains a list of secrets to pull the image of this deployment. If this list is defined, app.Spec.DockerRegistrySpec is not used. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "imagePullSecrets")] + pub image_pull_secrets: Option>, + /// KetchYamlData describes certain aspects of the application deployment being deployed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "ketchYaml")] + pub ketch_yaml: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub processes: Option>, + /// RoutingSettings contains a weight of the current deployment used to route incoming traffic. If an application has two deployments with corresponding weights of 30 and 70, then 3 of 10 incoming requests will be sent to the first deployment (approximately). + #[serde(default, skip_serializing_if = "Option::is_none", rename = "routingSettings")] + pub routing_settings: Option, + pub version: i64, +} + +/// ExposedPort represents a port exposed by a docker image. Native format is "port/PROTOCOL" string, we parse it and keep it as ExposedPort. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsExposedPorts { + pub port: i64, + pub protocol: String, +} + +/// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsImagePullSecrets { + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// KetchYamlData describes certain aspects of the application deployment being deployed. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYaml { + /// Healthcheck describes readiness and liveness probes of the application deployment. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub healthcheck: Option, + /// Hooks allow to run commands during different stages of the application deployment. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub hooks: Option, + /// Kubernetes contains specific configurations for Kubernetes. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub kubernetes: Option, +} + +/// Healthcheck describes readiness and liveness probes of the application deployment. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheck { + /// Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + #[serde(default, skip_serializing_if = "Option::is_none", rename = "livenessProbe")] + pub liveness_probe: Option, + /// Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readinessProbe")] + pub readiness_probe: Option, + /// StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + #[serde(default, skip_serializing_if = "Option::is_none", rename = "startupProbe")] + pub startup_probe: Option, +} + +/// Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckLivenessProbe { + /// Exec specifies the action to take. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exec: Option, + /// Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "failureThreshold")] + pub failure_threshold: Option, + /// GRPC specifies an action involving a GRPC port. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub grpc: Option, + /// HTTPGet specifies the http request to perform. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpGet")] + pub http_get: Option, + /// Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + #[serde(default, skip_serializing_if = "Option::is_none", rename = "initialDelaySeconds")] + pub initial_delay_seconds: Option, + /// How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "periodSeconds")] + pub period_seconds: Option, + /// Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "successThreshold")] + pub success_threshold: Option, + /// TCPSocket specifies an action involving a TCP port. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tcpSocket")] + pub tcp_socket: Option, + /// Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "terminationGracePeriodSeconds")] + pub termination_grace_period_seconds: Option, + /// Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + #[serde(default, skip_serializing_if = "Option::is_none", rename = "timeoutSeconds")] + pub timeout_seconds: Option, +} + +/// Exec specifies the action to take. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckLivenessProbeExec { + /// 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. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub command: Option>, +} + +/// GRPC specifies an action involving a GRPC port. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckLivenessProbeGrpc { + /// Port number of the gRPC service. Number must be in the range 1 to 65535. + pub port: i32, + /// Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + /// If this is not specified, the default behavior is defined by gRPC. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub service: Option, +} + +/// HTTPGet specifies the http request to perform. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckLivenessProbeHttpGet { + /// Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub host: Option, + /// Custom headers to set in the request. HTTP allows repeated headers. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpHeaders")] + pub http_headers: Option>, + /// Path to access on the HTTP server. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + pub port: IntOrString, + /// Scheme to use for connecting to the host. Defaults to HTTP. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub scheme: Option, +} + +/// HTTPHeader describes a custom header to be used in HTTP probes +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckLivenessProbeHttpGetHttpHeaders { + /// The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + pub name: String, + /// The header field value + pub value: String, +} + +/// TCPSocket specifies an action involving a TCP port. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckLivenessProbeTcpSocket { + /// Optional: Host name to connect to, defaults to the pod IP. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub host: Option, + /// Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + pub port: IntOrString, +} + +/// Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckReadinessProbe { + /// Exec specifies the action to take. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exec: Option, + /// Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "failureThreshold")] + pub failure_threshold: Option, + /// GRPC specifies an action involving a GRPC port. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub grpc: Option, + /// HTTPGet specifies the http request to perform. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpGet")] + pub http_get: Option, + /// Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + #[serde(default, skip_serializing_if = "Option::is_none", rename = "initialDelaySeconds")] + pub initial_delay_seconds: Option, + /// How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "periodSeconds")] + pub period_seconds: Option, + /// Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "successThreshold")] + pub success_threshold: Option, + /// TCPSocket specifies an action involving a TCP port. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tcpSocket")] + pub tcp_socket: Option, + /// Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "terminationGracePeriodSeconds")] + pub termination_grace_period_seconds: Option, + /// Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + #[serde(default, skip_serializing_if = "Option::is_none", rename = "timeoutSeconds")] + pub timeout_seconds: Option, +} + +/// Exec specifies the action to take. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckReadinessProbeExec { + /// 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. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub command: Option>, +} + +/// GRPC specifies an action involving a GRPC port. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckReadinessProbeGrpc { + /// Port number of the gRPC service. Number must be in the range 1 to 65535. + pub port: i32, + /// Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + /// If this is not specified, the default behavior is defined by gRPC. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub service: Option, +} + +/// HTTPGet specifies the http request to perform. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckReadinessProbeHttpGet { + /// Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub host: Option, + /// Custom headers to set in the request. HTTP allows repeated headers. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpHeaders")] + pub http_headers: Option>, + /// Path to access on the HTTP server. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + pub port: IntOrString, + /// Scheme to use for connecting to the host. Defaults to HTTP. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub scheme: Option, +} + +/// HTTPHeader describes a custom header to be used in HTTP probes +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckReadinessProbeHttpGetHttpHeaders { + /// The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + pub name: String, + /// The header field value + pub value: String, +} + +/// TCPSocket specifies an action involving a TCP port. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckReadinessProbeTcpSocket { + /// Optional: Host name to connect to, defaults to the pod IP. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub host: Option, + /// Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + pub port: IntOrString, +} + +/// StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckStartupProbe { + /// Exec specifies the action to take. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exec: Option, + /// Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "failureThreshold")] + pub failure_threshold: Option, + /// GRPC specifies an action involving a GRPC port. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub grpc: Option, + /// HTTPGet specifies the http request to perform. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpGet")] + pub http_get: Option, + /// Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + #[serde(default, skip_serializing_if = "Option::is_none", rename = "initialDelaySeconds")] + pub initial_delay_seconds: Option, + /// How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "periodSeconds")] + pub period_seconds: Option, + /// Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "successThreshold")] + pub success_threshold: Option, + /// TCPSocket specifies an action involving a TCP port. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tcpSocket")] + pub tcp_socket: Option, + /// Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "terminationGracePeriodSeconds")] + pub termination_grace_period_seconds: Option, + /// Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + #[serde(default, skip_serializing_if = "Option::is_none", rename = "timeoutSeconds")] + pub timeout_seconds: Option, +} + +/// Exec specifies the action to take. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckStartupProbeExec { + /// 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. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub command: Option>, +} + +/// GRPC specifies an action involving a GRPC port. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckStartupProbeGrpc { + /// Port number of the gRPC service. Number must be in the range 1 to 65535. + pub port: i32, + /// Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + /// If this is not specified, the default behavior is defined by gRPC. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub service: Option, +} + +/// HTTPGet specifies the http request to perform. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckStartupProbeHttpGet { + /// Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub host: Option, + /// Custom headers to set in the request. HTTP allows repeated headers. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpHeaders")] + pub http_headers: Option>, + /// Path to access on the HTTP server. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + pub port: IntOrString, + /// Scheme to use for connecting to the host. Defaults to HTTP. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub scheme: Option, +} + +/// HTTPHeader describes a custom header to be used in HTTP probes +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckStartupProbeHttpGetHttpHeaders { + /// The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + pub name: String, + /// The header field value + pub value: String, +} + +/// TCPSocket specifies an action involving a TCP port. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHealthcheckStartupProbeTcpSocket { + /// Optional: Host name to connect to, defaults to the pod IP. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub host: Option, + /// Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + pub port: IntOrString, +} + +/// Hooks allow to run commands during different stages of the application deployment. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHooks { + /// Restart describes commands to run during different stages of the application deployment. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub restart: Option, +} + +/// Restart describes commands to run during different stages of the application deployment. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlHooksRestart { + /// Before contains commands that are executed after a unit is restarted. Commands listed in this hook run once per unit. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub after: Option>, + /// Before contains commands that are executed before a unit is restarted. Commands listed in this hook run once per unit. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub before: Option>, +} + +/// Kubernetes contains specific configurations for Kubernetes. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlKubernetes { + /// Processes configure which ports are exposed on each process of the application deployment. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub processes: Option>, +} + +/// Processes configure which ports are exposed on each process of the application deployment. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlKubernetesProcesses { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ports: Option>, +} + +/// KetchYamlKubernetesConfig contains configuration of an exposed port. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsKetchYamlKubernetesProcessesPorts { + /// Name is a descriptive name for the port. This field is optional. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Port is the port that will be exposed on a Kubernetes service. If omitted, the target_port value is used. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// Protocol defines the port protocol. The accepted values are TCP and UDP. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub protocol: Option, + /// TargetPort is the port that the process is listening on. If omitted, the port value is used. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub target_port: Option, +} + +/// Label represents an environment variable present in an application. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsLabels { + /// Name of the label. + pub name: String, + /// Value of the label. + pub value: String, +} + +/// ProcessSpec is a specification of the desired behavior of a process. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcesses { + /// Commands executed on startup. + pub cmd: Vec, + /// Env is a list of environment variables to set in pods created for the process. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub env: Option>, + /// Name of the process. + pub name: String, + /// ResourceRequirements describes the compute resource requirements. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub resources: Option, + /// Security options the process should run with. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "securityContext")] + pub security_context: Option, + /// Units is a number of replicas of the process. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub units: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeMounts")] + pub volume_mounts: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub volumes: Option>, +} + +/// Env represents an environment variable present in an application. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesEnv { + /// Name of the environment variable. Must be a C_IDENTIFIER. + pub name: String, + /// Value of the environment variable. + pub value: String, +} + +/// ResourceRequirements describes the compute resource requirements. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesResources { + /// 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. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub claims: Option>, + /// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + #[serde(default, skip_serializing_if = "Option::is_none")] + pub limits: Option>, + /// 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/ + #[serde(default, skip_serializing_if = "Option::is_none")] + pub requests: Option>, +} + +/// ResourceClaim references one entry in PodSpec.ResourceClaims. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesResourcesClaims { + /// 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. + pub name: String, +} + +/// Security options the process should run with. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesSecurityContext { + /// AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "allowPrivilegeEscalation")] + pub allow_privilege_escalation: Option, + /// The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub capabilities: Option, + /// Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub privileged: Option, + /// procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "procMount")] + pub proc_mount: Option, + /// Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnlyRootFilesystem")] + pub read_only_root_filesystem: Option, + /// The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsGroup")] + pub run_as_group: Option, + /// Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsNonRoot")] + pub run_as_non_root: Option, + /// The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsUser")] + pub run_as_user: Option, + /// The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "seLinuxOptions")] + pub se_linux_options: Option, + /// The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "seccompProfile")] + pub seccomp_profile: Option, + /// The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "windowsOptions")] + pub windows_options: Option, +} + +/// The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesSecurityContextCapabilities { + /// Added capabilities + #[serde(default, skip_serializing_if = "Option::is_none")] + pub add: Option>, + /// Removed capabilities + #[serde(default, skip_serializing_if = "Option::is_none")] + pub drop: Option>, +} + +/// The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesSecurityContextSeLinuxOptions { + /// Level is SELinux level label that applies to the container. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub level: Option, + /// Role is a SELinux role label that applies to the container. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, + /// Type is a SELinux type label that applies to the container. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] + pub r#type: Option, + /// User is a SELinux user label that applies to the container. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub user: Option, +} + +/// The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesSecurityContextSeccompProfile { + /// localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "localhostProfile")] + pub localhost_profile: Option, + /// type indicates which kind of seccomp profile will be applied. Valid options are: + /// Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied. + #[serde(rename = "type")] + pub r#type: String, +} + +/// The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesSecurityContextWindowsOptions { + /// GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "gmsaCredentialSpec")] + pub gmsa_credential_spec: Option, + /// GMSACredentialSpecName is the name of the GMSA credential spec to use. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "gmsaCredentialSpecName")] + pub gmsa_credential_spec_name: Option, + /// 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. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "hostProcess")] + pub host_process: Option, + /// The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsUserName")] + pub run_as_user_name: Option, +} + +/// VolumeMount describes a mounting of a Volume within a container. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumeMounts { + /// Path within the container at which the volume should be mounted. Must not contain ':'. + #[serde(rename = "mountPath")] + pub mount_path: String, + /// mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "mountPropagation")] + pub mount_propagation: Option, + /// This must match the Name of a Volume. + pub name: String, + /// Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + #[serde(default, skip_serializing_if = "Option::is_none", rename = "subPath")] + pub sub_path: Option, + /// Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "subPathExpr")] + pub sub_path_expr: Option, +} + +/// Volume represents a named volume in a pod that may be accessed by any container in the pod. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumes { + /// awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + #[serde(default, skip_serializing_if = "Option::is_none", rename = "awsElasticBlockStore")] + pub aws_elastic_block_store: Option, + /// azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "azureDisk")] + pub azure_disk: Option, + /// azureFile represents an Azure File Service mount on the host and bind mount to the pod. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "azureFile")] + pub azure_file: Option, + /// cephFS represents a Ceph FS mount on the host that shares a pod's lifetime + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cephfs: Option, + /// cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cinder: Option, + /// configMap represents a configMap that should populate this volume + #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")] + pub config_map: Option, + /// csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub csi: Option, + /// downwardAPI represents downward API about the pod that should populate this volume + #[serde(default, skip_serializing_if = "Option::is_none", rename = "downwardAPI")] + pub downward_api: Option, + /// emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + #[serde(default, skip_serializing_if = "Option::is_none", rename = "emptyDir")] + pub empty_dir: Option, + /// ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + /// Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). + /// Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. + /// Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. + /// A pod can use both types of ephemeral volumes and persistent volumes at the same time. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ephemeral: Option, + /// fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub fc: Option, + /// flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "flexVolume")] + pub flex_volume: Option, + /// flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + #[serde(default, skip_serializing_if = "Option::is_none")] + pub flocker: Option, + /// gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + #[serde(default, skip_serializing_if = "Option::is_none", rename = "gcePersistentDisk")] + pub gce_persistent_disk: Option, + /// gitRepo represents a git repository at a particular revision. 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. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "gitRepo")] + pub git_repo: Option, + /// glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md + #[serde(default, skip_serializing_if = "Option::is_none")] + pub glusterfs: Option, + /// hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "hostPath")] + pub host_path: Option, + /// iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md + #[serde(default, skip_serializing_if = "Option::is_none")] + pub iscsi: Option, + /// name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + pub name: String, + /// nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + #[serde(default, skip_serializing_if = "Option::is_none")] + pub nfs: Option, + /// persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + #[serde(default, skip_serializing_if = "Option::is_none", rename = "persistentVolumeClaim")] + pub persistent_volume_claim: Option, + /// photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + #[serde(default, skip_serializing_if = "Option::is_none", rename = "photonPersistentDisk")] + pub photon_persistent_disk: Option, + /// portworxVolume represents a portworx volume attached and mounted on kubelets host machine + #[serde(default, skip_serializing_if = "Option::is_none", rename = "portworxVolume")] + pub portworx_volume: Option, + /// projected items for all in one resources secrets, configmaps, and downward API + #[serde(default, skip_serializing_if = "Option::is_none")] + pub projected: Option, + /// quobyte represents a Quobyte mount on the host that shares a pod's lifetime + #[serde(default, skip_serializing_if = "Option::is_none")] + pub quobyte: Option, + /// rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md + #[serde(default, skip_serializing_if = "Option::is_none")] + pub rbd: Option, + /// scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "scaleIO")] + pub scale_io: Option, + /// secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + #[serde(default, skip_serializing_if = "Option::is_none")] + pub secret: Option, + /// storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub storageos: Option, + /// vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + #[serde(default, skip_serializing_if = "Option::is_none", rename = "vsphereVolume")] + pub vsphere_volume: Option, +} + +/// awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesAwsElasticBlockStore { + /// fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub partition: Option, + /// readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + #[serde(rename = "volumeID")] + pub volume_id: String, +} + +/// azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesAzureDisk { + /// cachingMode is the Host Caching mode: None, Read Only, Read Write. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "cachingMode")] + pub caching_mode: Option, + /// diskName is the Name of the data disk in the blob storage + #[serde(rename = "diskName")] + pub disk_name: String, + /// diskURI is the URI of data disk in the blob storage + #[serde(rename = "diskURI")] + pub disk_uri: String, + /// fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared + #[serde(default, skip_serializing_if = "Option::is_none")] + pub kind: Option, + /// readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, +} + +/// azureFile represents an Azure File Service mount on the host and bind mount to the pod. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesAzureFile { + /// readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// secretName is the name of secret that contains Azure Storage Account Name and Key + #[serde(rename = "secretName")] + pub secret_name: String, + /// shareName is the azure share Name + #[serde(rename = "shareName")] + pub share_name: String, +} + +/// cephFS represents a Ceph FS mount on the host that shares a pod's lifetime +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesCephfs { + /// monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + pub monitors: Vec, + /// path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretFile")] + pub secret_file: Option, + /// secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + #[serde(default, skip_serializing_if = "Option::is_none")] + pub user: Option, +} + +/// secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesCephfsSecretRef { + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesCinder { + /// fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// secretRef is optional: points to a secret object containing parameters used to connect to OpenStack. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + #[serde(rename = "volumeID")] + pub volume_id: String, +} + +/// secretRef is optional: points to a secret object containing parameters used to connect to OpenStack. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesCinderSecretRef { + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// configMap represents a configMap that should populate this volume +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesConfigMap { + /// defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultMode")] + pub default_mode: Option, + /// items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub items: Option>, + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// optional specify whether the ConfigMap or its keys must be defined + #[serde(default, skip_serializing_if = "Option::is_none")] + pub optional: Option, +} + +/// Maps a string key to a path within a volume. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesConfigMapItems { + /// key is the key to project. + pub key: String, + /// mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mode: Option, + /// path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + pub path: String, +} + +/// csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesCsi { + /// driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + pub driver: String, + /// fsType to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodePublishSecretRef")] + pub node_publish_secret_ref: Option, + /// readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeAttributes")] + pub volume_attributes: Option>, +} + +/// nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesCsiNodePublishSecretRef { + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// downwardAPI represents downward API about the pod that should populate this volume +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesDownwardApi { + /// Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultMode")] + pub default_mode: Option, + /// Items is a list of downward API volume file + #[serde(default, skip_serializing_if = "Option::is_none")] + pub items: Option>, +} + +/// DownwardAPIVolumeFile represents information to create the file containing the pod field +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesDownwardApiItems { + /// Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")] + pub field_ref: Option, + /// Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mode: Option, + /// Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + pub path: String, + /// Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")] + pub resource_field_ref: Option, +} + +/// Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesDownwardApiItemsFieldRef { + /// Version of the schema the FieldPath is written in terms of, defaults to "v1". + #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")] + pub api_version: Option, + /// Path of the field to select in the specified API version. + #[serde(rename = "fieldPath")] + pub field_path: String, +} + +/// Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesDownwardApiItemsResourceFieldRef { + /// Container name: required for volumes, optional for env vars + #[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")] + pub container_name: Option, + /// Specifies the output format of the exposed resources, defaults to "1" + #[serde(default, skip_serializing_if = "Option::is_none")] + pub divisor: Option, + /// Required: resource to select + pub resource: String, +} + +/// emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEmptyDir { + /// medium represents what type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + #[serde(default, skip_serializing_if = "Option::is_none")] + pub medium: Option, + /// sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sizeLimit")] + pub size_limit: Option, +} + +/// ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. +/// Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). +/// Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. +/// Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. +/// A pod can use both types of ephemeral volumes and persistent volumes at the same time. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEphemeral { + /// Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). + /// An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. + /// This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. + /// Required, must not be nil. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeClaimTemplate")] + pub volume_claim_template: Option, +} + +/// Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). +/// An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. +/// This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. +/// Required, must not be nil. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEphemeralVolumeClaimTemplate { + /// May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub metadata: Option, + /// The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. + pub spec: AppDeploymentsProcessesVolumesEphemeralVolumeClaimTemplateSpec, +} + +/// May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEphemeralVolumeClaimTemplateMetadata { +} + +/// The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEphemeralVolumeClaimTemplateSpec { + /// accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + #[serde(default, skip_serializing_if = "Option::is_none", rename = "accessModes")] + pub access_modes: Option>, + /// dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "dataSource")] + pub data_source: Option, + /// dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "dataSourceRef")] + pub data_source_ref: Option, + /// resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + #[serde(default, skip_serializing_if = "Option::is_none")] + pub resources: Option, + /// selector is a label query over volumes to consider for binding. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub selector: Option, + /// storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + #[serde(default, skip_serializing_if = "Option::is_none", rename = "storageClassName")] + pub storage_class_name: Option, + /// volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeMode")] + pub volume_mode: Option, + /// volumeName is the binding reference to the PersistentVolume backing this claim. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeName")] + pub volume_name: Option, +} + +/// dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEphemeralVolumeClaimTemplateSpecDataSource { + /// APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiGroup")] + pub api_group: Option, + /// Kind is the type of resource being referenced + pub kind: String, + /// Name is the name of resource being referenced + pub name: String, +} + +/// dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEphemeralVolumeClaimTemplateSpecDataSourceRef { + /// APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiGroup")] + pub api_group: Option, + /// Kind is the type of resource being referenced + pub kind: String, + /// Name is the name of resource being referenced + pub name: String, + /// Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEphemeralVolumeClaimTemplateSpecResources { + /// 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. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub claims: Option>, + /// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + #[serde(default, skip_serializing_if = "Option::is_none")] + pub limits: Option>, + /// 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/ + #[serde(default, skip_serializing_if = "Option::is_none")] + pub requests: Option>, +} + +/// ResourceClaim references one entry in PodSpec.ResourceClaims. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEphemeralVolumeClaimTemplateSpecResourcesClaims { + /// 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. + pub name: String, +} + +/// selector is a label query over volumes to consider for binding. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEphemeralVolumeClaimTemplateSpecSelector { + /// matchExpressions is a list of label selector requirements. The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] + pub match_expressions: Option>, + /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] + pub match_labels: Option>, +} + +/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesEphemeralVolumeClaimTemplateSpecSelectorMatchExpressions { + /// key is the label key that the selector applies to. + pub key: String, + /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + pub operator: String, + /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +/// fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesFc { + /// fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// lun is Optional: FC target lun number + #[serde(default, skip_serializing_if = "Option::is_none")] + pub lun: Option, + /// readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// targetWWNs is Optional: FC target worldwide names (WWNs) + #[serde(default, skip_serializing_if = "Option::is_none", rename = "targetWWNs")] + pub target_ww_ns: Option>, + /// wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub wwids: Option>, +} + +/// flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesFlexVolume { + /// driver is the name of the driver to use for this volume. + pub driver: String, + /// fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// options is Optional: this field holds extra command options if any. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub options: Option>, + /// readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, +} + +/// secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesFlexVolumeSecretRef { + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesFlocker { + /// datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + #[serde(default, skip_serializing_if = "Option::is_none", rename = "datasetName")] + pub dataset_name: Option, + /// datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset + #[serde(default, skip_serializing_if = "Option::is_none", rename = "datasetUUID")] + pub dataset_uuid: Option, +} + +/// gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesGcePersistentDisk { + /// fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + #[serde(default, skip_serializing_if = "Option::is_none")] + pub partition: Option, + /// pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + #[serde(rename = "pdName")] + pub pd_name: String, + /// readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, +} + +/// gitRepo represents a git repository at a particular revision. 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. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesGitRepo { + /// directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub directory: Option, + /// repository is the URL + pub repository: String, + /// revision is the commit hash for the specified revision. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub revision: Option, +} + +/// glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesGlusterfs { + /// endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + pub endpoints: String, + /// path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + pub path: String, + /// readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, +} + +/// hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesHostPath { + /// path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + pub path: String, + /// type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] + pub r#type: Option, +} + +/// iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesIscsi { + /// chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "chapAuthDiscovery")] + pub chap_auth_discovery: Option, + /// chapAuthSession defines whether support iSCSI Session CHAP authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "chapAuthSession")] + pub chap_auth_session: Option, + /// fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "initiatorName")] + pub initiator_name: Option, + /// iqn is the target iSCSI Qualified Name. + pub iqn: String, + /// iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + #[serde(default, skip_serializing_if = "Option::is_none", rename = "iscsiInterface")] + pub iscsi_interface: Option, + /// lun represents iSCSI Target Lun number. + pub lun: i32, + /// portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub portals: Option>, + /// readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// secretRef is the CHAP Secret for iSCSI target and initiator authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + #[serde(rename = "targetPortal")] + pub target_portal: String, +} + +/// secretRef is the CHAP Secret for iSCSI target and initiator authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesIscsiSecretRef { + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesNfs { + /// path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + pub path: String, + /// readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + pub server: String, +} + +/// persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesPersistentVolumeClaim { + /// claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + #[serde(rename = "claimName")] + pub claim_name: String, + /// readOnly Will force the ReadOnly setting in VolumeMounts. Default false. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, +} + +/// photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesPhotonPersistentDisk { + /// fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// pdID is the ID that identifies Photon Controller persistent disk + #[serde(rename = "pdID")] + pub pd_id: String, +} + +/// portworxVolume represents a portworx volume attached and mounted on kubelets host machine +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesPortworxVolume { + /// fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// volumeID uniquely identifies a Portworx volume + #[serde(rename = "volumeID")] + pub volume_id: String, +} + +/// projected items for all in one resources secrets, configmaps, and downward API +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjected { + /// defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultMode")] + pub default_mode: Option, + /// sources is the list of volume projections + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sources: Option>, +} + +/// Projection that may be projected along with other supported volume types +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjectedSources { + /// configMap information about the configMap data to project + #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")] + pub config_map: Option, + /// downwardAPI information about the downwardAPI data to project + #[serde(default, skip_serializing_if = "Option::is_none", rename = "downwardAPI")] + pub downward_api: Option, + /// secret information about the secret data to project + #[serde(default, skip_serializing_if = "Option::is_none")] + pub secret: Option, + /// serviceAccountToken is information about the serviceAccountToken data to project + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountToken")] + pub service_account_token: Option, +} + +/// configMap information about the configMap data to project +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjectedSourcesConfigMap { + /// items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub items: Option>, + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// optional specify whether the ConfigMap or its keys must be defined + #[serde(default, skip_serializing_if = "Option::is_none")] + pub optional: Option, +} + +/// Maps a string key to a path within a volume. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjectedSourcesConfigMapItems { + /// key is the key to project. + pub key: String, + /// mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mode: Option, + /// path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + pub path: String, +} + +/// downwardAPI information about the downwardAPI data to project +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjectedSourcesDownwardApi { + /// Items is a list of DownwardAPIVolume file + #[serde(default, skip_serializing_if = "Option::is_none")] + pub items: Option>, +} + +/// DownwardAPIVolumeFile represents information to create the file containing the pod field +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjectedSourcesDownwardApiItems { + /// Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")] + pub field_ref: Option, + /// Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mode: Option, + /// Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + pub path: String, + /// Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")] + pub resource_field_ref: Option, +} + +/// Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjectedSourcesDownwardApiItemsFieldRef { + /// Version of the schema the FieldPath is written in terms of, defaults to "v1". + #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")] + pub api_version: Option, + /// Path of the field to select in the specified API version. + #[serde(rename = "fieldPath")] + pub field_path: String, +} + +/// Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjectedSourcesDownwardApiItemsResourceFieldRef { + /// Container name: required for volumes, optional for env vars + #[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")] + pub container_name: Option, + /// Specifies the output format of the exposed resources, defaults to "1" + #[serde(default, skip_serializing_if = "Option::is_none")] + pub divisor: Option, + /// Required: resource to select + pub resource: String, +} + +/// secret information about the secret data to project +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjectedSourcesSecret { + /// items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub items: Option>, + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// optional field specify whether the Secret or its key must be defined + #[serde(default, skip_serializing_if = "Option::is_none")] + pub optional: Option, +} + +/// Maps a string key to a path within a volume. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjectedSourcesSecretItems { + /// key is the key to project. + pub key: String, + /// mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mode: Option, + /// path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + pub path: String, +} + +/// serviceAccountToken is information about the serviceAccountToken data to project +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesProjectedSourcesServiceAccountToken { + /// audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audience: Option, + /// expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "expirationSeconds")] + pub expiration_seconds: Option, + /// path is the path relative to the mount point of the file to project the token into. + pub path: String, +} + +/// quobyte represents a Quobyte mount on the host that shares a pod's lifetime +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesQuobyte { + /// group to map volume access to Default is no group + #[serde(default, skip_serializing_if = "Option::is_none")] + pub group: Option, + /// readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + pub registry: String, + /// tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tenant: Option, + /// user to map volume access to Defaults to serivceaccount user + #[serde(default, skip_serializing_if = "Option::is_none")] + pub user: Option, + /// volume is a string that references an already created Quobyte volume by name. + pub volume: String, +} + +/// rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesRbd { + /// fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + pub image: String, + /// keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + #[serde(default, skip_serializing_if = "Option::is_none")] + pub keyring: Option, + /// monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + pub monitors: Vec, + /// pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + #[serde(default, skip_serializing_if = "Option::is_none")] + pub pool: Option, + /// readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + #[serde(default, skip_serializing_if = "Option::is_none")] + pub user: Option, +} + +/// secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesRbdSecretRef { + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesScaleIo { + /// fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// gateway is the host address of the ScaleIO API Gateway. + pub gateway: String, + /// protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "protectionDomain")] + pub protection_domain: Option, + /// readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + #[serde(rename = "secretRef")] + pub secret_ref: AppDeploymentsProcessesVolumesScaleIoSecretRef, + /// sslEnabled Flag enable/disable SSL communication with Gateway, default false + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sslEnabled")] + pub ssl_enabled: Option, + /// storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "storageMode")] + pub storage_mode: Option, + /// storagePool is the ScaleIO Storage Pool associated with the protection domain. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "storagePool")] + pub storage_pool: Option, + /// system is the name of the storage system as configured in ScaleIO. + pub system: String, + /// volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeName")] + pub volume_name: Option, +} + +/// secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesScaleIoSecretRef { + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesSecret { + /// defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultMode")] + pub default_mode: Option, + /// items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub items: Option>, + /// optional field specify whether the Secret or its keys must be defined + #[serde(default, skip_serializing_if = "Option::is_none")] + pub optional: Option, + /// secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretName")] + pub secret_name: Option, +} + +/// Maps a string key to a path within a volume. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesSecretItems { + /// key is the key to project. + pub key: String, + /// mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mode: Option, + /// path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + pub path: String, +} + +/// storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesStorageos { + /// fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")] + pub read_only: Option, + /// secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeName")] + pub volume_name: Option, + /// volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeNamespace")] + pub volume_namespace: Option, +} + +/// secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesStorageosSecretRef { + /// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsProcessesVolumesVsphereVolume { + /// fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")] + pub fs_type: Option, + /// storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "storagePolicyID")] + pub storage_policy_id: Option, + /// storagePolicyName is the storage Policy Based Management (SPBM) profile name. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "storagePolicyName")] + pub storage_policy_name: Option, + /// volumePath is the path that identifies vSphere volume vmdk + #[serde(rename = "volumePath")] + pub volume_path: String, +} + +/// RoutingSettings contains a weight of the current deployment used to route incoming traffic. If an application has two deployments with corresponding weights of 30 and 70, then 3 of 10 incoming requests will be sent to the first deployment (approximately). +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDeploymentsRoutingSettings { + pub weight: i64, +} + +/// DockerRegistry contains docker registry configuration of the application. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppDockerRegistry { + /// SecretName is added to the "imagePullSecrets" list of each application pod. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretName")] + pub secret_name: Option, +} + +/// Env represents an environment variable present in an application. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppEnv { + /// Name of the environment variable. Must be a C_IDENTIFIER. + pub name: String, + /// Value of the environment variable. + pub value: String, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppExtensions { +} + +/// Ingress contains configuration of entrypoints to access the application. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppIngress { + /// Cnames is a list of additional cnames. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cnames: Option>, + /// Controller is the ingress controller the app is using + #[serde(default, skip_serializing_if = "Option::is_none")] + pub controller: Option, + /// GenerateDefaultCname if set the application will have a default cname ..shipa.cloud. + #[serde(rename = "generateDefaultCname")] + pub generate_default_cname: bool, +} + +/// Cname represents a DNS record and whether the record use TLS. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppIngressCnames { + pub name: String, + /// SecretName if provided must contain an SSL certificate that will be used to serve this cname. Currently, the secret must be in the app's namespace. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretName")] + pub secret_name: Option, + pub secure: bool, +} + +/// Controller is the ingress controller the app is using +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppIngressController { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "className")] + pub class_name: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterIssuer")] + pub cluster_issuer: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceEndpoint")] + pub service_endpoint: Option, + /// IngressControllerType is a type of an ingress controller. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] + pub r#type: Option, +} + +/// MetadataItem represent a request to add label/annotations to processes +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppLabels { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub apply: Option>, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "deploymentVersion")] + pub deployment_version: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "processName")] + pub process_name: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub target: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppLabelsTarget { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")] + pub api_version: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub kind: Option, +} + +/// SecurityContext specifies security settings for a pod/app, which get applied to all containers. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppSecurityContext { + /// A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: + /// 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- + /// If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsGroup")] + pub fs_group: Option, + /// fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsGroupChangePolicy")] + pub fs_group_change_policy: Option, + /// The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsGroup")] + pub run_as_group: Option, + /// Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsNonRoot")] + pub run_as_non_root: Option, + /// The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsUser")] + pub run_as_user: Option, + /// The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "seLinuxOptions")] + pub se_linux_options: Option, + /// The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "seccompProfile")] + pub seccomp_profile: Option, + /// A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in the container image for the uid of the container process. If unspecified, no additional groups are added to any container. Note that group memberships defined in the container image for the uid of the container process are still effective, even if they are not included in this list. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "supplementalGroups")] + pub supplemental_groups: Option>, + /// Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sysctls: Option>, + /// The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "windowsOptions")] + pub windows_options: Option, +} + +/// The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppSecurityContextSeLinuxOptions { + /// Level is SELinux level label that applies to the container. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub level: Option, + /// Role is a SELinux role label that applies to the container. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, + /// Type is a SELinux type label that applies to the container. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] + pub r#type: Option, + /// User is a SELinux user label that applies to the container. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub user: Option, +} + +/// The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppSecurityContextSeccompProfile { + /// localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "localhostProfile")] + pub localhost_profile: Option, + /// type indicates which kind of seccomp profile will be applied. Valid options are: + /// Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied. + #[serde(rename = "type")] + pub r#type: String, +} + +/// Sysctl defines a kernel parameter to be set +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppSecurityContextSysctls { + /// Name of a property to set + pub name: String, + /// Value of a property to set + pub value: String, +} + +/// The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppSecurityContextWindowsOptions { + /// GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "gmsaCredentialSpec")] + pub gmsa_credential_spec: Option, + /// GMSACredentialSpecName is the name of the GMSA credential spec to use. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "gmsaCredentialSpecName")] + pub gmsa_credential_spec_name: Option, + /// 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. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "hostProcess")] + pub host_process: Option, + /// The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsUserName")] + pub run_as_user_name: Option, +} + +/// AppSpec defines the desired state of App. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum AppType { + Deployment, + StatefulSet, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppVolumeClaimTemplates { + #[serde(rename = "accessModes")] + pub access_modes: Vec, + pub name: String, + pub storage: String, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "storageClassName")] + pub storage_class_name: Option, +} + +/// AppStatus represents information about the status of an application. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppStatus { + /// Conditions of App resource. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, + /// ExtensionsStatuses can be used by third-parties to keep additional information. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "extensionsStatuses")] + pub extensions_statuses: Option>, +} + +/// Condition contains details for the current condition of this app. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppStatusConditions { + /// LastTransitionTime is the timestamp corresponding to the last status. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTransitionTime")] + pub last_transition_time: Option, + /// A human readable message indicating details about why the application is in this condition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub message: Option, + /// Status of the condition. + pub status: String, + /// Type of the condition. + #[serde(rename = "type")] + pub r#type: String, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct AppStatusExtensionsStatuses { +} + diff --git a/kube-custom-resources-rs/src/theketch_io/v1beta1/jobs.rs b/kube-custom-resources-rs/src/theketch_io/v1beta1/jobs.rs new file mode 100644 index 000000000..560d15c25 --- /dev/null +++ b/kube-custom-resources-rs/src/theketch_io/v1beta1/jobs.rs @@ -0,0 +1,94 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/theketchio/ketch/theketch.io/v1beta1/jobs.yaml --derive=Default --derive=PartialEq +// kopium version: 0.16.2 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; + +/// JobSpec defines the desired state of Job +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "theketch.io", version = "v1beta1", kind = "Job", plural = "jobs")] +#[kube(namespaced)] +#[kube(status = "JobStatus")] +#[kube(schema = "disabled")] +pub struct JobSpec { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "backoffLimit")] + pub backoff_limit: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub completions: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub containers: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "failedJobsHistoryLimit")] + pub failed_jobs_history_limit: Option, + pub name: String, + pub namespace: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub parallelism: Option, + /// Policy represents the policy types a job can have + #[serde(default, skip_serializing_if = "Option::is_none")] + pub policy: Option, + /// CronJob-specific + #[serde(default, skip_serializing_if = "Option::is_none")] + pub schedule: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "startingDeadlineSeconds")] + pub starting_deadline_seconds: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "successfulJobsHistoryLimit")] + pub successful_jobs_history_limit: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suspend: Option, + #[serde(rename = "type")] + pub r#type: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub version: Option, +} + +/// Container represents a single container run in a Job +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct JobContainers { + pub command: Vec, + pub image: String, + pub name: String, +} + +/// Policy represents the policy types a job can have +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct JobPolicy { + /// CronJob-specific + #[serde(default, skip_serializing_if = "Option::is_none", rename = "concurrencyPolicy")] + pub concurrency_policy: Option, + /// RestartPolicy describes how the container should be restarted. Only one of the following restart policies may be specified. If none of the following policies is specified, the default one is RestartPolicyAlways. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "restartPolicy")] + pub restart_policy: Option, +} + +/// JobStatus defines the observed state of Job +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct JobStatus { + /// CronJob-specific + pub active: bool, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastScheduleTime")] + pub last_schedule_time: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastSuccessfulTime")] + pub last_successful_time: Option, +} + +/// Condition contains details for the current condition of this app. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct JobStatusConditions { + /// LastTransitionTime is the timestamp corresponding to the last status. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTransitionTime")] + pub last_transition_time: Option, + /// A human readable message indicating details about why the application is in this condition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub message: Option, + /// Status of the condition. + pub status: String, + /// Type of the condition. + #[serde(rename = "type")] + pub r#type: String, +} + diff --git a/kube-custom-resources-rs/src/theketch_io/v1beta1/mod.rs b/kube-custom-resources-rs/src/theketch_io/v1beta1/mod.rs new file mode 100644 index 000000000..51cc07abc --- /dev/null +++ b/kube-custom-resources-rs/src/theketch_io/v1beta1/mod.rs @@ -0,0 +1,2 @@ +pub mod apps; +pub mod jobs;