diff --git a/.copywrite.hcl b/.copywrite.hcl index 77b8828e9f..5c2ba58ec0 100644 --- a/.copywrite.hcl +++ b/.copywrite.hcl @@ -11,5 +11,6 @@ project { ".markdownlint.yml", ".release/**", "vendor/**", + "examples/**" ] } diff --git a/.markdownlint.yml b/.markdownlint.yml index 0ae15e39d0..d57d9ce0d1 100644 --- a/.markdownlint.yml +++ b/.markdownlint.yml @@ -18,7 +18,11 @@ MD013: false MD014: false MD022: false MD024: false +MD029: false +MD033: false MD034: false +MD037: false MD038: false MD040: false +MD046: false MD047: false diff --git a/docs/resources/annotations.md b/docs/resources/annotations.md index 850681a879..a67642d9fe 100644 --- a/docs/resources/annotations.md +++ b/docs/resources/annotations.md @@ -9,6 +9,40 @@ description: |- This resource allows Terraform to manage the annotations for a resource that already exists. This resource uses [field management](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) to manage only the annotations that are defined in the Terraform configuration. Existing annotations not specified in the configuration will be ignored. If an annotation specified in the config and is already managed by another client it will cause a conflict which can be overridden by setting `force` to true. + +## Schema + +### Required + +- `api_version` (String) The apiVersion of the resource to annotate. +- `kind` (String) The kind of the resource to annotate. +- `metadata` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `annotations` (Map of String) A map of annotations to apply to the resource. +- `field_manager` (String) Set the name of the field manager for the specified labels. +- `force` (Boolean) Force overwriting annotations that were created or edited outside of Terraform. +- `template_annotations` (Map of String) A map of annotations to apply to the resource template. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Required: + +- `name` (String) The name of the resource. + +Optional: + +- `namespace` (String) The namespace of the resource. + + + + ## Example Usage ```terraform @@ -44,29 +78,6 @@ resource "kubernetes_annotations" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -~> NOTE: At least one of `annotations` or `template_annotations` is required. - -* `api_version` - (Required) The apiVersion of the resource to be annotated. -* `kind` - (Required) The kind of the resource to be annotated. -* `metadata` - (Required) Standard metadata of the resource to be annotated. -* `annotations` - (Optional) A map of annotations to apply to the resource. -* `template_annotations` - (Optional) A map of annotations to apply to the pod template within the resource. -* `force` - (Optional) Force management of annotations if there is a conflict. Defaults to `false`. -* `field_manager` - (Optional) The name of the [field manager](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management). Defaults to `Terraform`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `name` - (Required) Name of the resource to be annotated. -* `namespace` - (Optional) Namespace of the resource to be annotated. - ## Import This resource does not support the `import` command. As this resource operates on Kubernetes resources that already exist, creating the resource is equivalent to importing it. diff --git a/docs/resources/api_service.md b/docs/resources/api_service.md index 7ca8ec02ca..cea787f6a8 100644 --- a/docs/resources/api_service.md +++ b/docs/resources/api_service.md @@ -9,77 +9,88 @@ description: |- An API Service is an abstraction which defines for locating and communicating with servers. -## Example Usage + +## Schema -```terraform -resource "kubernetes_api_service" "example" { - metadata { - name = "terraform-example" - } - spec { - selector { - app = "${kubernetes_pod.example.metadata.0.labels.app}" - } - session_affinity = "ClientIP" - port { - port = 8080 - target_port = 80 - } +### Required - type = "LoadBalancer" - } -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard api_service's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec contains information for locating and communicating with a server. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` -## Argument Reference +Optional: -The following arguments are supported: +- `annotations` (Map of String) An unstructured key value map stored with the api_service that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the api_service. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the api_service, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `metadata` - (Required) Standard API service's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec contains information for locating and communicating with a server. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) +Read-Only: -## Nested Blocks +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this api_service that can be used by clients to determine when api_service has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this api_service. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -### `metadata` -#### Arguments + +### Nested Schema for `spec` -* `annotations` - (Optional) An unstructured key value map stored with the API service that may be used to store arbitrary metadata. +Required: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `group` (String) Group is the API group name this server hosts. +- `group_priority_minimum` (Number) GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s. +- `version` (String) Version is the API version this server hosts. For example, `v1`. +- `version_priority` (Number) VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is `kube-like`, it will sort above non `kube-like` version strings, which are ordered lexicographically. `Kube-like` versions start with a `v`, then are followed by a number (the major version), then optionally the string `alpha` or `beta` and another number (the minor version). These are sorted first by GA > `beta` > `alpha` (where GA is a version with no suffix such as `beta` or `alpha`), and then by comparing major version, then minor version. An example sorted list of versions: `v10`, `v2`, `v1`, `v11beta2`, `v10beta3`, `v3beta1`, `v12alpha1`, `v11alpha2`, `foo1`, `foo10`. -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the API service. +Optional: -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +- `ca_bundle` (String) CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used. +- `insecure_skip_tls_verify` (Boolean) InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. +- `service` (Block List, Max: 1) Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. (see [below for nested schema](#nestedblock--spec--service)) -* `name` - (Optional) Name of the API service, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) + +### Nested Schema for `spec.service` -#### Attributes +Required: -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this API service that can be used by clients to determine when API service has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this API service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +- `name` (String) Name is the name of the service. +- `namespace` (String) Namespace is the namespace of the service. -### `spec` +Optional: -#### Arguments +- `port` (Number) If specified, the port on the service that is hosting the service. Defaults to 443 for backward compatibility. Should be a valid port number (1-65535, inclusive). -* `ca_bundle` - (Optional) CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used. -* `group` - (Required) Group is the API group name this server hosts. -* `group_priority_minimum` - (Required) GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s. -* `insecure_skip_tls_verify` - (Required) InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. -* `service` - (Optional) Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. See `service` block attributes below. -* `version` - (Required) Version is the API version this server hosts. For example, `v1`. -* `version_priority` - (Required) VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is `kube-like`, it will sort above non `kube-like` version strings, which are ordered lexicographically. `Kube-like` versions start with a `v`, then are followed by a number (the major version), then optionally the string `alpha` or `beta` and another number (the minor version). These are sorted first by GA > `beta` > `alpha` (where GA is a version with no suffix such as `beta` or `alpha`), and then by comparing major version, then minor version. An example sorted list of versions: `v10`, `v2`, `v1`, `v11beta2`, `v10beta3`, `v3beta1`, `v12alpha1`, `v11alpha2`, `foo1`, `foo10`.. -### `service` -#### Arguments -* `name` - (Required) Name is the name of the service. -* `namespace` - (Required) Namespace is the namespace of the service. -* `port` - (Optional) If specified, the port on the service that is hosting the service. Defaults to 443 for backward compatibility. Should be a valid port number (1-65535, inclusive). + +## Example Usage + +```terraform +resource "kubernetes_api_service" "example" { + metadata { + name = "terraform-example" + } + spec { + selector { + app = "${kubernetes_pod.example.metadata.0.labels.app}" + } + session_affinity = "ClientIP" + port { + port = 8080 + target_port = 80 + } + + type = "LoadBalancer" + } +} +``` ## Import diff --git a/docs/resources/api_service_v1.md b/docs/resources/api_service_v1.md index 8f20d6211a..90079c1de2 100644 --- a/docs/resources/api_service_v1.md +++ b/docs/resources/api_service_v1.md @@ -9,77 +9,88 @@ description: |- An API Service is an abstraction which defines for locating and communicating with servers. -## Example Usage + +## Schema -```terraform -resource "kubernetes_api_service_v1" "example" { - metadata { - name = "terraform-example" - } - spec { - selector { - app = "${kubernetes_pod.example.metadata.0.labels.app}" - } - session_affinity = "ClientIP" - port { - port = 8080 - target_port = 80 - } +### Required - type = "LoadBalancer" - } -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard api_service's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec contains information for locating and communicating with a server. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` -## Argument Reference +Optional: -The following arguments are supported: +- `annotations` (Map of String) An unstructured key value map stored with the api_service that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the api_service. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the api_service, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `metadata` - (Required) Standard API service's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec contains information for locating and communicating with a server. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) +Read-Only: -## Nested Blocks +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this api_service that can be used by clients to determine when api_service has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this api_service. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -### `metadata` -#### Arguments + +### Nested Schema for `spec` -* `annotations` - (Optional) An unstructured key value map stored with the API service that may be used to store arbitrary metadata. +Required: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `group` (String) Group is the API group name this server hosts. +- `group_priority_minimum` (Number) GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s. +- `version` (String) Version is the API version this server hosts. For example, `v1`. +- `version_priority` (Number) VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is `kube-like`, it will sort above non `kube-like` version strings, which are ordered lexicographically. `Kube-like` versions start with a `v`, then are followed by a number (the major version), then optionally the string `alpha` or `beta` and another number (the minor version). These are sorted first by GA > `beta` > `alpha` (where GA is a version with no suffix such as `beta` or `alpha`), and then by comparing major version, then minor version. An example sorted list of versions: `v10`, `v2`, `v1`, `v11beta2`, `v10beta3`, `v3beta1`, `v12alpha1`, `v11alpha2`, `foo1`, `foo10`. -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the API service. +Optional: -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +- `ca_bundle` (String) CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used. +- `insecure_skip_tls_verify` (Boolean) InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. +- `service` (Block List, Max: 1) Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. (see [below for nested schema](#nestedblock--spec--service)) -* `name` - (Optional) Name of the API service, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) + +### Nested Schema for `spec.service` -#### Attributes +Required: -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this API service that can be used by clients to determine when API service has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this API service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +- `name` (String) Name is the name of the service. +- `namespace` (String) Namespace is the namespace of the service. -### `spec` +Optional: -#### Arguments +- `port` (Number) If specified, the port on the service that is hosting the service. Defaults to 443 for backward compatibility. Should be a valid port number (1-65535, inclusive). -* `ca_bundle` - (Optional) CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used. -* `group` - (Required) Group is the API group name this server hosts. -* `group_priority_minimum` - (Required) GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s. -* `insecure_skip_tls_verify` - (Required) InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. -* `service` - (Optional) Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. See `service` block attributes below. -* `version` - (Required) Version is the API version this server hosts. For example, `v1`. -* `version_priority` - (Required) VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is `kube-like`, it will sort above non `kube-like` version strings, which are ordered lexicographically. `Kube-like` versions start with a `v`, then are followed by a number (the major version), then optionally the string `alpha` or `beta` and another number (the minor version). These are sorted first by GA > `beta` > `alpha` (where GA is a version with no suffix such as `beta` or `alpha`), and then by comparing major version, then minor version. An example sorted list of versions: `v10`, `v2`, `v1`, `v11beta2`, `v10beta3`, `v3beta1`, `v12alpha1`, `v11alpha2`, `foo1`, `foo10`.. -### `service` -#### Arguments -* `name` - (Required) Name is the name of the service. -* `namespace` - (Required) Namespace is the namespace of the service. -* `port` - (Optional) If specified, the port on the service that is hosting the service. Defaults to 443 for backward compatibility. Should be a valid port number (1-65535, inclusive). + +## Example Usage + +```terraform +resource "kubernetes_api_service_v1" "example" { + metadata { + name = "terraform-example" + } + spec { + selector { + app = "${kubernetes_pod.example.metadata.0.labels.app}" + } + session_affinity = "ClientIP" + port { + port = 8080 + target_port = 80 + } + + type = "LoadBalancer" + } +} +``` ## Import diff --git a/docs/resources/certificate_signing_request.md b/docs/resources/certificate_signing_request.md index 26e2728d2c..b52d3f38b3 100644 --- a/docs/resources/certificate_signing_request.md +++ b/docs/resources/certificate_signing_request.md @@ -7,11 +7,92 @@ description: |- # kubernetes_certificate_signing_request -Use this resource to generate TLS certificates using Kubernetes. +Use this resource to generate TLS certificates using Kubernetes. This is a *logical resource*, so it contributes only to the current Terraform state and does not persist any external managed resources. This resource enables automation of [X.509](https://www.itu.int/rec/T-REC-X.509) credential provisioning (including TLS/SSL certificates). It does this by creating a CertificateSigningRequest using the Kubernetes API, which generates a certificate from the Certificate Authority (CA) configured in the Kubernetes cluster. The CSR can be approved automatically by Terraform, or it can be approved by a custom controller running in Kubernetes. See [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) for all available options pertaining to CertificateSigningRequests. + + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard certificate signing request's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Describes a certificate signing request (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `auto_approve` (Boolean) Automatically approve the CertificateSigningRequest +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `certificate` (String) If request was approved, the controller will place the issued certificate here. +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the certificate signing request that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the certificate signing request. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the certificate signing request, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this certificate signing request that can be used by clients to determine when certificate signing request has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this certificate signing request. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `request` (String) Base64-encoded PKCS#10 CSR data + +Optional: + +- `signer_name` (String) Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`.If empty, it will be defaulted: 1. If it's a kubelet client certificate, it is assigned `kubernetes.io/kube-apiserver-client-kubelet`.2. If it's a kubelet serving certificate, it is assigned `kubernetes.io/kubelet-serving`.3. Otherwise, it is assigned `kubernetes.io/legacy-unknown`. Distribution of trust for signers happens out of band.You can select on this field using `spec.signerName`. +- `usages` (Set of String) allowedUsages specifies a set of usage contexts the key will be valid for. See: + https://tools.ietf.org/html/rfc5280#section-4.2.1.3 + https://tools.ietf.org/html/rfc5280#section-4.2.1.12 + +Valid values are: + "signing", + "digital signature", + "content commitment", + "key encipherment", + "key agreement", + "data encipherment", + "cert sign", + "crl sign", + "encipher only", + "decipher only", + "any", + "server auth", + "client auth", + "code signing", + "email protection", + "s/mime", + "ipsec end system", + "ipsec tunnel", + "ipsec user", + "timestamping", + "ocsp signing", + "microsoft sgc", + "netscape sgc" + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + -This is a *logical resource*, so it contributes only to the current Terraform state and does not persist any external managed resources. -This resource enables automation of [X.509](https://www.itu.int/rec/T-REC-X.509) credential provisioning (including TLS/SSL certificates). It does this by creating a CertificateSigningRequest using the Kubernetes API, which generates a certificate from the Certificate Authority (CA) configured in the Kubernetes cluster. The CSR can be approved automatically by Terraform, or it can be approved by a custom controller running in Kubernetes. See [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) for all available options pertaining to CertificateSigningRequests. ## Example Usage @@ -48,46 +129,6 @@ resource "kubernetes_secret" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `auto_approve` - (Optional) Automatically approve the CertificateSigningRequest. Defaults to 'true'. -* `metadata` - (Required) Standard certificate signing request's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the deployment. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the certificate signing request that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the certificate signing request. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the certificate signing request, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `certificate` - The signed certificate PEM data. -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this certificate signing request that can be used by clients to determine when certificate signing request has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this certificate signing request. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `request` - (Required) Base64-encoded PKCS#10 CSR data. -* `signer_name` - (Optional) Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`. If empty, it will be defaulted: 1. If it's a kubelet client certificate, it is assigned "kubernetes.io/kube-apiserver-client-kubelet". 2. If it's a kubelet serving certificate, it is assigned "kubernetes.io/kubelet-serving". 3. Otherwise, it is assigned "kubernetes.io/legacy-unknown". Distribution of trust for signers happens out of band. -* `usages` - (Required) Specifies a set of usage contexts the key will be valid for. See https://godoc.org/k8s.io/api/certificates/v1beta1#KeyUsage - ## Generating a New Certificate Since the certificate is a logical resource that lives only in the Terraform state, it will persist until it is explicitly destroyed by the user. diff --git a/docs/resources/certificate_signing_request_v1.md b/docs/resources/certificate_signing_request_v1.md index 41395163f8..b278a3ef12 100644 --- a/docs/resources/certificate_signing_request_v1.md +++ b/docs/resources/certificate_signing_request_v1.md @@ -7,11 +7,126 @@ description: |- # kubernetes_certificate_signing_request_v1 -Use this resource to generate TLS certificates using Kubernetes. +Use this resource to generate TLS certificates using Kubernetes. This is a *logical resource*, so it contributes only to the current Terraform state and does not persist any external managed resources. This resource enables automation of [X.509](https://www.itu.int/rec/T-REC-X.509) credential provisioning (including TLS/SSL certificates). It does this by creating a CertificateSigningRequest using the Kubernetes API, which generates a certificate from the Certificate Authority (CA) configured in the Kubernetes cluster. The CSR can be approved automatically by Terraform, or it can be approved by a custom controller running in Kubernetes. See [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) for all available options pertaining to CertificateSigningRequests. + + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard certificate signing request's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued. + +Kubelets use this API to obtain: + + 1. client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client-kubelet" signerName). + 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the "kubernetes.io/kubelet-serving" signerName). + +This API can be used to request client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client" signerName), or to obtain certificates from custom non-Kubernetes signers. (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `auto_approve` (Boolean) Automatically approve the CertificateSigningRequest +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `certificate` (String) certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable. + +If the certificate signing request is denied, a condition of type "Denied" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type "Failed" is added and this field remains empty. + +Validation requirements: + + 1. certificate must contain one or more PEM blocks. + 2. All PEM blocks must have the "CERTIFICATE" label, contain no headers, and the encoded data + must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280. + 3. Non-PEM content may appear before or after the "CERTIFICATE" PEM blocks and is unvalidated, + to allow for explanatory text as described in section 5.2 of RFC7468. + +If more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes. + +The certificate is encoded in PEM format. + +When serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of: + + base64( + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the certificate signing request that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the certificate signing request. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the certificate signing request, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this certificate signing request that can be used by clients to determine when certificate signing request has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this certificate signing request. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `request` (String) request contains an x509 certificate signing request encoded in a "CERTIFICATE REQUEST" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded. +- `signer_name` (String) signerName indicates the requested signer, and is a qualified name. + +List/watch requests for CertificateSigningRequests can filter on this field using a "spec.signerName=NAME" fieldSelector. + +Well-known Kubernetes signers are: + + 1. "kubernetes.io/kube-apiserver-client": issues client certificates that can be used to authenticate to kube-apiserver. + Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the "csrsigning" controller in kube-controller-manager. + 2. "kubernetes.io/kube-apiserver-client-kubelet": issues client certificates that kubelets use to authenticate to kube-apiserver. + Requests for this signer can be auto-approved by the "csrapproving" controller in kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager. + 3. "kubernetes.io/kubelet-serving" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely. + Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager. + +More details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers + +Custom signerNames can also be specified. The signer defines: + + 1. Trust distribution: how trust (CA bundles) are distributed. + 2. Permitted subjects: and behavior when a disallowed subject is requested. + 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested. + 4. Required, permitted, or forbidden key usages / extended key usages. + 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin. + 6. Whether or not requests for CA certificates are allowed. + +Optional: + +- `usages` (Set of String) usages specifies a set of key usages requested in the issued certificate. + +Requests for TLS client certificates typically request: "digital signature", "key encipherment", "client auth". + +Requests for TLS serving certificates typically request: "key encipherment", "digital signature", "server auth". + +Valid values are: + "signing", "digital signature", "content commitment", + "key encipherment", "key agreement", "data encipherment", + "cert sign", "crl sign", "encipher only", "decipher only", "any", + "server auth", "client auth", + "code signing", "email protection", "s/mime", + "ipsec end system", "ipsec tunnel", "ipsec user", + "timestamping", "ocsp signing", "microsoft sgc", "netscape sgc" + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + -This is a *logical resource*, so it contributes only to the current Terraform state and does not persist any external managed resources. -This resource enables automation of [X.509](https://www.itu.int/rec/T-REC-X.509) credential provisioning (including TLS/SSL certificates). It does this by creating a CertificateSigningRequest using the Kubernetes API, which generates a certificate from the Certificate Authority (CA) configured in the Kubernetes cluster. The CSR can be approved automatically by Terraform, or it can be approved by a custom controller running in Kubernetes. See [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) for all available options pertaining to CertificateSigningRequests. ## Example Usage @@ -51,46 +166,6 @@ resource "kubernetes_secret" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `auto_approve` - (Optional) Automatically approve the CertificateSigningRequest. Defaults to 'true'. -* `metadata` - (Required) Standard certificate signing request's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the deployment. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the certificate signing request that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the certificate signing request. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the certificate signing request, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `certificate` - The signed certificate PEM data. -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this certificate signing request that can be used by clients to determine when certificate signing request has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this certificate signing request. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `request` - (Required) Base64-encoded PKCS#10 CSR data. -* `signer_name` - (Required) Indicates the requested signer, and is a qualified name. See https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers -* `usages` - (Required) Specifies a set of usage contexts the key will be valid for. See https://godoc.org/k8s.io/api/certificates/v1#KeyUsage - ## Generating a New Certificate Since the certificate is a logical resource that lives only in the Terraform state, it will persist until it is explicitly destroyed by the user. diff --git a/docs/resources/cluster_role.md b/docs/resources/cluster_role.md index 140026fc2f..bf67d23228 100644 --- a/docs/resources/cluster_role.md +++ b/docs/resources/cluster_role.md @@ -9,6 +9,83 @@ description: |- A ClusterRole creates a role at the cluster level and in all namespaces. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard clusterRole's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `aggregation_rule` (Block List, Max: 1) Describes how to build the Rules for this ClusterRole. (see [below for nested schema](#nestedblock--aggregation_rule)) +- `rule` (Block List) List of PolicyRules for this ClusterRole (see [below for nested schema](#nestedblock--rule)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the clusterRole that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the clusterRole. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the clusterRole, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this clusterRole that can be used by clients to determine when clusterRole has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this clusterRole. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `aggregation_rule` + +Optional: + +- `cluster_role_selectors` (Block List) A list of selectors which will be used to find ClusterRoles and create the rules. (see [below for nested schema](#nestedblock--aggregation_rule--cluster_role_selectors)) + + +### Nested Schema for `aggregation_rule.cluster_role_selectors` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--aggregation_rule--cluster_role_selectors--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `aggregation_rule.cluster_role_selectors.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `rule` + +Required: + +- `verbs` (List of String) Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + +Optional: + +- `api_groups` (List of String) APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. +- `non_resource_urls` (List of String) NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. +- `resource_names` (List of String) ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. +- `resources` (List of String) Resources is a list of resources this rule applies to. ResourceAll represents all resources. + + + + ## Example Usage ```terraform @@ -49,60 +126,6 @@ resource "kubernetes_cluster_role" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `rule` - (Optional) The PolicyRoles for this ClusterRole. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole) -* `aggregation_rule` - (Optional) Describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be overwritten by the controller. . For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the cluster role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the cluster role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the cluster role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this cluster role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `rule` - -#### Arguments - -* `api_groups` - (Optional) APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. -* `non_resource_urls` - (Optional) NonResourceURLs is a set of partial urls that a user should have access to. \*s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. -* `resource_names` - (Optional) ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. -* `resources` - (Optional) Resources is a list of resources this rule applies to. ResourceAll represents all resources. -* `verbs` - (Required) Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - -### `aggregation_rule` - -#### Arguments - -* `cluster_role_selectors` - (Optional) A list of selectors which will be used to find ClusterRoles and create the rules. - -### `cluster_role_selectors` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. - ## Import ClusterRole can be imported using the name, e.g. diff --git a/docs/resources/cluster_role_binding.md b/docs/resources/cluster_role_binding.md index 4c9b982c9c..b91ec2e7ce 100644 --- a/docs/resources/cluster_role_binding.md +++ b/docs/resources/cluster_role_binding.md @@ -7,7 +7,63 @@ description: |- # kubernetes_cluster_role_binding -A ClusterRoleBinding may be used to grant permission at the cluster level and in all namespaces +A ClusterRoleBinding may be used to grant permission at the cluster level and in all namespaces. + + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard clusterRoleBinding's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `role_ref` (Block List, Min: 1, Max: 1) RoleRef references the Cluster Role for this binding (see [below for nested schema](#nestedblock--role_ref)) +- `subject` (Block List, Min: 1) Subjects defines the entities to bind a ClusterRole to. (see [below for nested schema](#nestedblock--subject)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the clusterRoleBinding that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the clusterRoleBinding. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the clusterRoleBinding, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this clusterRoleBinding that can be used by clients to determine when clusterRoleBinding has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this clusterRoleBinding. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `role_ref` + +Required: + +- `api_group` (String) The API group of the user. The only value possible at the moment is `rbac.authorization.k8s.io`. +- `kind` (String) The kind of resource. +- `name` (String) The name of the User to bind to. + + + +### Nested Schema for `subject` + +Required: + +- `kind` (String) The kind of resource. +- `name` (String) The name of the resource to bind to. + +Optional: + +- `api_group` (String) The API group of the subject resource. +- `namespace` (String) The Namespace of the subject resource. + + + ## Example Usage @@ -39,54 +95,6 @@ resource "kubernetes_cluster_role_binding" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `role_ref` - (Required) The ClusterRole to bind Subjects to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) -* `subject` - (Required) The Users, Groups, or ServiceAccounts to grant permissions to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-subjects) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the cluster role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the cluster role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the cluster role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this cluster role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `role_ref` - -#### Arguments - -* `name` - (Required) The name of this ClusterRole to bind Subjects to. -* `kind` - (Required) The type of binding to use. This value must be and defaults to `ClusterRole` -* `api_group` - (Required) The API group to drive authorization decisions. This value must be and defaults to `rbac.authorization.k8s.io` - -### `subject` - -#### Arguments - -* `name` - (Required) The name of this ClusterRole to bind Subjects to. -* `namespace` - (Optional) Namespace defines the namespace of the ServiceAccount to bind to. This value only applies to kind `ServiceAccount` -* `kind` - (Required) The type of binding to use. This value must be `ServiceAccount`, `User` or `Group` -* `api_group` - (Required) The API group to drive authorization decisions. This value only applies to kind `User` and `Group`. It must be `rbac.authorization.k8s.io` - ## Import ClusterRoleBinding can be imported using the name, e.g. diff --git a/docs/resources/cluster_role_binding_v1.md b/docs/resources/cluster_role_binding_v1.md index 877dd5c730..43d065d73b 100644 --- a/docs/resources/cluster_role_binding_v1.md +++ b/docs/resources/cluster_role_binding_v1.md @@ -9,6 +9,62 @@ description: |- A ClusterRoleBinding may be used to grant permission at the cluster level and in all namespaces + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard clusterRoleBinding's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `role_ref` (Block List, Min: 1, Max: 1) RoleRef references the Cluster Role for this binding (see [below for nested schema](#nestedblock--role_ref)) +- `subject` (Block List, Min: 1) Subjects defines the entities to bind a ClusterRole to. (see [below for nested schema](#nestedblock--subject)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the clusterRoleBinding that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the clusterRoleBinding. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the clusterRoleBinding, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this clusterRoleBinding that can be used by clients to determine when clusterRoleBinding has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this clusterRoleBinding. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `role_ref` + +Required: + +- `api_group` (String) The API group of the user. The only value possible at the moment is `rbac.authorization.k8s.io`. +- `kind` (String) The kind of resource. +- `name` (String) The name of the User to bind to. + + + +### Nested Schema for `subject` + +Required: + +- `kind` (String) The kind of resource. +- `name` (String) The name of the resource to bind to. + +Optional: + +- `api_group` (String) The API group of the subject resource. +- `namespace` (String) The Namespace of the subject resource. + + + + ## Example Usage ```terraform @@ -39,54 +95,6 @@ resource "kubernetes_cluster_role_binding_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `role_ref` - (Required) The ClusterRole to bind Subjects to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) -* `subject` - (Required) The Users, Groups, or ServiceAccounts to grant permissions to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-subjects) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the cluster role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the cluster role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the cluster role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this cluster role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `role_ref` - -#### Arguments - -* `name` - (Required) The name of this ClusterRole to bind Subjects to. -* `kind` - (Required) The type of binding to use. This value must be and defaults to `ClusterRole` -* `api_group` - (Required) The API group to drive authorization decisions. This value must be and defaults to `rbac.authorization.k8s.io` - -### `subject` - -#### Arguments - -* `name` - (Required) The name of this ClusterRole to bind Subjects to. -* `namespace` - (Optional) Namespace defines the namespace of the ServiceAccount to bind to. This value only applies to kind `ServiceAccount` -* `kind` - (Required) The type of binding to use. This value must be `ServiceAccount`, `User` or `Group` -* `api_group` - (Required) The API group to drive authorization decisions. This value only applies to kind `User` and `Group`. It must be `rbac.authorization.k8s.io` - ## Import ClusterRoleBinding can be imported using the name, e.g. diff --git a/docs/resources/cluster_role_v1.md b/docs/resources/cluster_role_v1.md index 5c6c289235..80229ddc51 100644 --- a/docs/resources/cluster_role_v1.md +++ b/docs/resources/cluster_role_v1.md @@ -9,6 +9,83 @@ description: |- A ClusterRole creates a role at the cluster level and in all namespaces. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard clusterRole's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `aggregation_rule` (Block List, Max: 1) Describes how to build the Rules for this ClusterRole. (see [below for nested schema](#nestedblock--aggregation_rule)) +- `rule` (Block List) List of PolicyRules for this ClusterRole (see [below for nested schema](#nestedblock--rule)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the clusterRole that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the clusterRole. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the clusterRole, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this clusterRole that can be used by clients to determine when clusterRole has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this clusterRole. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `aggregation_rule` + +Optional: + +- `cluster_role_selectors` (Block List) A list of selectors which will be used to find ClusterRoles and create the rules. (see [below for nested schema](#nestedblock--aggregation_rule--cluster_role_selectors)) + + +### Nested Schema for `aggregation_rule.cluster_role_selectors` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--aggregation_rule--cluster_role_selectors--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `aggregation_rule.cluster_role_selectors.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `rule` + +Required: + +- `verbs` (List of String) Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + +Optional: + +- `api_groups` (List of String) APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. +- `non_resource_urls` (List of String) NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. +- `resource_names` (List of String) ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. +- `resources` (List of String) Resources is a list of resources this rule applies to. ResourceAll represents all resources. + + + + ## Example Usage ```terraform @@ -49,60 +126,6 @@ resource "kubernetes_cluster_role_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `rule` - (Optional) The PolicyRoles for this ClusterRole. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole) -* `aggregation_rule` - (Optional) Describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be overwritten by the controller. . For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the cluster role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the cluster role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the cluster role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this cluster role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `rule` - -#### Arguments - -* `api_groups` - (Optional) APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. -* `non_resource_urls` - (Optional) NonResourceURLs is a set of partial urls that a user should have access to. \*s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. -* `resource_names` - (Optional) ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. -* `resources` - (Optional) Resources is a list of resources this rule applies to. '\*' represents all resources. -* `verbs` - (Required) Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. '\*' represents all kinds. - -### `aggregation_rule` - -#### Arguments - -* `cluster_role_selectors` - (Optional) A list of selectors which will be used to find ClusterRoles and create the rules. - -### `cluster_role_selectors` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. - ## Import ClusterRole can be imported using the name, e.g. diff --git a/docs/resources/config_map.md b/docs/resources/config_map.md index a7ab451c21..33331975de 100644 --- a/docs/resources/config_map.md +++ b/docs/resources/config_map.md @@ -9,6 +9,43 @@ description: |- The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes. Config Map can be used to store fine-grained information like individual properties or coarse-grained information like entire config files or JSON blobs. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard config map's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `binary_data` (Map of String) BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. This field only accepts base64-encoded payloads that will be decoded/encoded before being sent/received to/from the apiserver. +- `data` (Map of String) Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. +- `immutable` (Boolean) Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the config map that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the config map. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the config map, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the config map must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this config map that can be used by clients to determine when config map has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this config map. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + + ## Example Usage ```terraform @@ -29,39 +66,6 @@ resource "kubernetes_config_map" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `binary_data` - (Optional) BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. This field only accepts base64-encoded payloads that will be decoded/received before being sent/received to the apiserver. -* `data` - (Optional) Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. -* `immutable` - (Optional) Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. -* `metadata` - (Required) Standard config map's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the config map that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the config map. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the config map, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the config map must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this config map that can be used by clients to determine when config map has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this config map. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import Config Map can be imported using its namespace and name, e.g. diff --git a/docs/resources/config_map_v1.md b/docs/resources/config_map_v1.md index 995b94c94b..1395cd740d 100644 --- a/docs/resources/config_map_v1.md +++ b/docs/resources/config_map_v1.md @@ -9,6 +9,43 @@ description: |- The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes. Config Map can be used to store fine-grained information like individual properties or coarse-grained information like entire config files or JSON blobs. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard config map's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `binary_data` (Map of String) BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. This field only accepts base64-encoded payloads that will be decoded/encoded before being sent/received to/from the apiserver. +- `data` (Map of String) Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. +- `immutable` (Boolean) Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the config map that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the config map. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the config map, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the config map must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this config map that can be used by clients to determine when config map has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this config map. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + + ## Example Usage ```terraform @@ -29,39 +66,6 @@ resource "kubernetes_config_map_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `binary_data` - (Optional) BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. This field only accepts base64-encoded payloads that will be decoded/received before being sent/received to the apiserver. -* `data` - (Optional) Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. -* `immutable` - (Optional) Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. -* `metadata` - (Required) Standard config map's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the config map that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the config map. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the config map, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the config map must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this config map that can be used by clients to determine when config map has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this config map. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import Config Map can be imported using its namespace and name, e.g. diff --git a/docs/resources/config_map_v1_data.md b/docs/resources/config_map_v1_data.md index f30811367f..6b21810e79 100644 --- a/docs/resources/config_map_v1_data.md +++ b/docs/resources/config_map_v1_data.md @@ -9,6 +9,37 @@ description: |- This resource allows Terraform to manage data within a pre-existing ConfigMap. This resource uses [field management](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) to manage only the data that is defined in the Terraform configuration. Existing data not specified in the configuration will be ignored. If data specified in the config and is already managed by another client it will cause a conflict which can be overridden by setting `force` to true. + +## Schema + +### Required + +- `data` (Map of String) The data we want to add to the ConfigMap. +- `metadata` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `field_manager` (String) Set the name of the field manager for the specified labels. +- `force` (Boolean) Force overwriting data that is managed outside of Terraform. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Required: + +- `name` (String) The name of the ConfigMap. + +Optional: + +- `namespace` (String) The namespace of the ConfigMap. + + + + ## Example Usage ```terraform @@ -22,24 +53,6 @@ resource "kubernetes_config_map_v1_data" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard metadata of the ConfigMap. -* `data` - (Required) A map of data to apply to the ConfigMap. -* `force` - (Optional) Force management of the configured data if there is a conflict. -* `field_manager` - (Optional) The name of the [field manager](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management). Defaults to `Terraform`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `name` - (Required) Name of the ConfigMap. -* `namespace` - (Optional) Namespace of the ConfigMap. - ## Import This resource does not support the `import` command. As this resource operates on Kubernetes resources that already exist, creating the resource is equivalent to importing it. diff --git a/docs/resources/cron_job.md b/docs/resources/cron_job.md index f7eb9aae5f..ace26227a9 100644 --- a/docs/resources/cron_job.md +++ b/docs/resources/cron_job.md @@ -5,7 +5,7 @@ description: |- A Cron Job creates Jobs on a time-based schedule. One CronJob object is like one line of a crontab (cron table) file. --- -# kubernetes_cron_job +# kubernetes_cron_job A Cron Job creates Jobs on a time-based schedule. @@ -15,152 +15,2351 @@ Note: All CronJob `schedule` times are based on the timezone of the master where ~> NOTE: With the release of Kubernetes v1.25, CronJob batch/v1beta1 has been removed. You can read more information about migrating to batch/v1 in the [Kubernetes 1.25 migration guide](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#cronjob-v125). -## Example Usage + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard cronjob's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec of the cron job owned by the cluster (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the cronjob that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the cronjob. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the cronjob, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the cronjob must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this cronjob that can be used by clients to determine when cronjob has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this cronjob. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `job_template` (Block List, Min: 1, Max: 1) Describes the pod that will be created when executing a cron job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ (see [below for nested schema](#nestedblock--spec--job_template)) +- `schedule` (String) Cron format string, e.g. 0 * * * * or @hourly, as schedule time of its jobs to be created and executed. + +Optional: + +- `concurrency_policy` (String) Specifies how to treat concurrent executions of a Job. Defaults to Allow. +- `failed_jobs_history_limit` (Number) The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. +- `starting_deadline_seconds` (Number) Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. +- `successful_jobs_history_limit` (Number) The number of successful finished jobs to retain. Defaults to 3. +- `suspend` (Boolean) This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + + +### Nested Schema for `spec.job_template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard jobTemplateSpec's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--job_template--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Specification of the desired behavior of the job (see [below for nested schema](#nestedblock--spec--job_template--spec)) + + +### Nested Schema for `spec.job_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the jobTemplateSpec that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the jobTemplateSpec. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the jobTemplateSpec, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the jobTemplateSpec must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this jobTemplateSpec that can be used by clients to determine when jobTemplateSpec has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this jobTemplateSpec. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.job_template.spec` + +Required: + +- `template` (Block List, Min: 1, Max: 1) Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ (see [below for nested schema](#nestedblock--spec--job_template--spec--template)) + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `backoff_limit` (Number) Specifies the number of retries before marking this job failed. Defaults to 6 +- `completion_mode` (String) Specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. More info: https://kubernetes.io/docs/concepts/workloads/controllers/job/#completion-mode +- `completions` (Number) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +- `manual_selector` (Boolean) Controls generation of pod labels and pod selectors. Leave unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md +- `parallelism` (Number) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +- `pod_failure_policy` (Block List, Max: 1) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ (see [below for nested schema](#nestedblock--spec--job_template--spec--pod_failure_policy)) +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--job_template--spec--selector)) +- `ttl_seconds_after_finished` (String) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. + + +### Nested Schema for `spec.job_template.spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard job's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--job_template--spec--template--metadata)) + +Optional: + +- `spec` (Block List, Max: 1) Spec of the pods owned by the job (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec)) + + +### Nested Schema for `spec.job_template.spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the job that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the job. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the job, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this job that can be used by clients to determine when job has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this job. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.job_template.spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.job_template.spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.job_template.spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.job_template.spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.job_template.spec.template.spec.os` + +Required: + +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. + + + +### Nested Schema for `spec.job_template.spec.template.spec.readiness_gate` + +Required: + +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. + + + +### Nested Schema for `spec.job_template.spec.template.spec.security_context` + +Optional: + +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--security_context--windows_options)) + + +### Nested Schema for `spec.job_template.spec.template.spec.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.job_template.spec.template.spec.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + +### Nested Schema for `spec.job_template.spec.template.spec.security_context.sysctl` + +Required: + +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. + + + +### Nested Schema for `spec.job_template.spec.template.spec.security_context.windows_options` + +Optional: + +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.toleration` + +Optional: + +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + + + +### Nested Schema for `spec.job_template.spec.template.spec.topology_spread_constraint` + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. + + +### Nested Schema for `spec.job_template.spec.template.spec.topology_spread_constraint.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.topology_spread_constraint.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume` + +Optional: + +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--vsphere_volume)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.aws_elastic_block_store` + +Required: + +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.azure_disk` + +Required: + +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage + +Optional: + +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.azure_file` + +Required: + +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name + +Optional: + +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ceph_fs` + +Required: + +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +Optional: + +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ceph_fs.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.cinder` + +Required: + +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +Optional: + +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.config_map` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.csi` + +Required: + +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi + +Optional: + +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.csi.node_publish_secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.downward_api` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--downward_api--items)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.downward_api.items` + +Required: -```terraform -resource "kubernetes_cron_job" "demo" { - metadata { - name = "demo" - } - spec { - concurrency_policy = "Replace" - failed_jobs_history_limit = 5 - schedule = "1 0 * * *" - starting_deadline_seconds = 10 - successful_jobs_history_limit = 10 - job_template { - metadata {} - spec { - backoff_limit = 2 - ttl_seconds_after_finished = 10 - template { - metadata {} - spec { - container { - name = "hello" - image = "busybox" - command = ["/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster"] - } - } - } - } - } - } -} -``` +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' + +Optional: + +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.empty_dir` + +Optional: + +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.iscsi` + +Required: + +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). + +Optional: + +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.local` -## Argument Reference +Optional: -The following arguments are supported: +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local -* `metadata` - (Required) Standard resource's metadata. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `spec` - (Required) Spec defines the behavior of a CronJob. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -## Nested Blocks + +### Nested Schema for `spec.job_template.spec.template.spec.volume.nfs` -### `metadata` +Required: -#### Arguments +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. +Optional: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + +### Nested Schema for `spec.job_template.spec.template.spec.volume.persistent_volume_claim` -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. +Optional: -#### Attributes +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -### `spec` + +### Nested Schema for `spec.job_template.spec.template.spec.volume.photon_persistent_disk` -#### Arguments +Required: -* `concurrency_policy` - (Optional) Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one -* `failed_jobs_history_limit` - (Optional) The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. -* `job_template` - (Required) Specifies the job that will be created when executing a CronJob. -* `schedule` - (Required) The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. -* `starting_deadline_seconds` - (Optional) Deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. -* `successful_jobs_history_limit` - (Optional) The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. -* `suspend` - (Optional) This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. +- `pd_id` (String) ID that identifies Photon Controller persistent disk -### `job_template` +Optional: -#### Arguments +- `fs_type` (String) 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. -* `metadata` - (Required) Standard object's metadata of the jobs created from this template. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Specification of the desired behavior of the job. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -### `metadata` + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected` -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: +Required: -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources)) -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. +Optional: -### `spec` +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -#### Arguments + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources` -* `active_deadline_seconds` - (Optional) Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. -* `backoff_limit` - (Optional) Specifies the number of retries before marking this job failed. Defaults to 6 -* `completions` - (Optional) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `manual_selector` - (Optional) Controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector -* `pod_failure_policy` - (Optional) Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure. -* `parallelism` - (Optional) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when `((.spec.completions - .status.successful) < .spec.parallelism)`, i.e. when the work left to do is less than max parallelism. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `selector` - (Optional) A label query over pods that should match the pod count. Normally, the system sets this field for you. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors -* `template` - (Optional) Describes the pod that will be created when executing a job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `ttl_seconds_after_finished` - (Optional) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. +Optional: -### `pod_failure_policy` +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--service_account_token)) -#### Arguments + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.config_map` -* `rule` - (Required) A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. +Optional: -### `rule` +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. -#### Arguments + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.config_map.items` -* `action` - (Optional) Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. -* `on_exit_codes` - (Optional) Represents the requirement on the container exit codes. -* `on_pod_condition` - (Optional) Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. +Optional: -### `on_exit_codes` +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -#### Arguments -* `container_name` - (Optional) Restricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template. -* `operator` - (Optional) Represents the relationship between the container exit code(s) and the specified values. -* `values` - (Required) Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. -### `on_pod_condition` + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.downward_api` -#### Arguments +Optional: -* `status` - (Optional) Specifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True. -* `type` - (Optional) Specifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type. +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--downward_api--items)) -### `selector` + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.downward_api.items` -#### Arguments +Required: -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. +- `path` (String) 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 '..' -### `template` +Optional: -#### Arguments +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) -These arguments are the same as the for the `spec` block of a Pod. + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.downward_api.items.field_ref` -Please see the [Pod resource](pod.html#spec) for reference. +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.secret` + +Optional: + +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + +### Nested Schema for `spec.job_template.spec.pod_failure_policy` + +Required: + +- `rule` (Block List, Min: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--job_template--spec--pod_failure_policy--rule)) + + +### Nested Schema for `spec.job_template.spec.pod_failure_policy.rule` + +Optional: + +- `action` (String) +- `on_exit_codes` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--job_template--spec--pod_failure_policy--rule--on_exit_codes)) +- `on_pod_condition` (Block List) (see [below for nested schema](#nestedblock--spec--job_template--spec--pod_failure_policy--rule--on_pod_condition)) + + +### Nested Schema for `spec.job_template.spec.pod_failure_policy.rule.on_exit_codes` + +Required: + +- `values` (List of Number) + +Optional: + +- `container_name` (String) +- `operator` (String) + + + +### Nested Schema for `spec.job_template.spec.pod_failure_policy.rule.on_pod_condition` + +Optional: + +- `status` (String) +- `type` (String) + + + + + +### Nested Schema for `spec.job_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `delete` (String) + + + + +## Example Usage + +```terraform +resource "kubernetes_cron_job" "demo" { + metadata { + name = "demo" + } + spec { + concurrency_policy = "Replace" + failed_jobs_history_limit = 5 + schedule = "1 0 * * *" + starting_deadline_seconds = 10 + successful_jobs_history_limit = 10 + job_template { + metadata {} + spec { + backoff_limit = 2 + ttl_seconds_after_finished = 10 + template { + metadata {} + spec { + container { + name = "hello" + image = "busybox" + command = ["/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster"] + } + } + } + } + } + } +} +``` diff --git a/docs/resources/cron_job_v1.md b/docs/resources/cron_job_v1.md index 4d6d2783e0..0f6f6662e6 100644 --- a/docs/resources/cron_job_v1.md +++ b/docs/resources/cron_job_v1.md @@ -7,160 +7,2355 @@ description: |- # kubernetes_cron_job_v1 -A Cron Job creates Jobs on a time-based schedule. +A Cron Job creates Jobs on a time-based schedule.One CronJob object is like one line of a crontab (cron table) file. It runs a job periodically on a given schedule, written in Cron format.Note: All CronJob `schedule` times are based on the timezone of the master where the job is initiated. For instructions on creating and working with cron jobs, and for an example of a spec file for a cron job, see [Kubernetes reference](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/). -One CronJob object is like one line of a crontab (cron table) file. It runs a job periodically on a given schedule, written in Cron format. + +## Schema -Note: All CronJob `schedule` times are based on the timezone of the master where the job is initiated. For instructions on creating and working with cron jobs, and for an example of a spec file for a cron job, see [Kubernetes reference](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/). +### Required -## Example Usage +- `metadata` (Block List, Min: 1, Max: 1) Standard cronjob's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec of the cron job owned by the cluster (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the cronjob that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the cronjob. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the cronjob, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the cronjob must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this cronjob that can be used by clients to determine when cronjob has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this cronjob. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `job_template` (Block List, Min: 1, Max: 1) Describes the pod that will be created when executing a cron job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ (see [below for nested schema](#nestedblock--spec--job_template)) +- `schedule` (String) Cron format string, e.g. 0 * * * * or @hourly, as schedule time of its jobs to be created and executed. + +Optional: + +- `concurrency_policy` (String) Specifies how to treat concurrent executions of a Job. Defaults to Allow. +- `failed_jobs_history_limit` (Number) The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. +- `starting_deadline_seconds` (Number) Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. +- `successful_jobs_history_limit` (Number) The number of successful finished jobs to retain. Defaults to 3. +- `suspend` (Boolean) This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. +- `timezone` (String) The time zone for the given schedule. If not specified, this will rely on the time zone of the kube-controller-manager process. + + +### Nested Schema for `spec.job_template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard jobTemplateSpec's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--job_template--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Specification of the desired behavior of the job (see [below for nested schema](#nestedblock--spec--job_template--spec)) + + +### Nested Schema for `spec.job_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the jobTemplateSpec that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the jobTemplateSpec. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the jobTemplateSpec, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the jobTemplateSpec must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this jobTemplateSpec that can be used by clients to determine when jobTemplateSpec has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this jobTemplateSpec. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.job_template.spec` + +Required: + +- `template` (Block List, Min: 1, Max: 1) Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ (see [below for nested schema](#nestedblock--spec--job_template--spec--template)) + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `backoff_limit` (Number) Specifies the number of retries before marking this job failed. Defaults to 6 +- `completion_mode` (String) Specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. More info: https://kubernetes.io/docs/concepts/workloads/controllers/job/#completion-mode +- `completions` (Number) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +- `manual_selector` (Boolean) Controls generation of pod labels and pod selectors. Leave unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md +- `parallelism` (Number) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +- `pod_failure_policy` (Block List, Max: 1) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ (see [below for nested schema](#nestedblock--spec--job_template--spec--pod_failure_policy)) +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--job_template--spec--selector)) +- `ttl_seconds_after_finished` (String) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. + + +### Nested Schema for `spec.job_template.spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard job's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--job_template--spec--template--metadata)) + +Optional: + +- `spec` (Block List, Max: 1) Spec of the pods owned by the job (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec)) + + +### Nested Schema for `spec.job_template.spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the job that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the job. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the job, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this job that can be used by clients to determine when job has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this job. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.job_template.spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.job_template.spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.job_template.spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.job_template.spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.job_template.spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.init_container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.job_template.spec.template.spec.os` + +Required: + +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. + + + +### Nested Schema for `spec.job_template.spec.template.spec.readiness_gate` + +Required: + +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. + + + +### Nested Schema for `spec.job_template.spec.template.spec.security_context` + +Optional: + +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--security_context--windows_options)) + + +### Nested Schema for `spec.job_template.spec.template.spec.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.job_template.spec.template.spec.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + +### Nested Schema for `spec.job_template.spec.template.spec.security_context.sysctl` + +Required: + +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. + + + +### Nested Schema for `spec.job_template.spec.template.spec.security_context.windows_options` + +Optional: + +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.toleration` + +Optional: + +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + + + +### Nested Schema for `spec.job_template.spec.template.spec.topology_spread_constraint` + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. + + +### Nested Schema for `spec.job_template.spec.template.spec.topology_spread_constraint.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.topology_spread_constraint.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume` + +Optional: + +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--vsphere_volume)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.aws_elastic_block_store` + +Required: + +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.azure_disk` + +Required: + +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage + +Optional: + +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.azure_file` + +Required: + +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name + +Optional: + +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ceph_fs` + +Required: + +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +Optional: + +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ceph_fs.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.cinder` + +Required: + +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +Optional: + +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.config_map` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.csi` + +Required: + +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi + +Optional: + +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.csi.node_publish_secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.downward_api` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--downward_api--items)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.downward_api.items` + +Required: + +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' + +Optional: -```terraform -resource "kubernetes_cron_job_v1" "demo" { - metadata { - name = "demo" - } - spec { - concurrency_policy = "Replace" - failed_jobs_history_limit = 5 - schedule = "1 0 * * *" - timezone = "Etc/UTC" - starting_deadline_seconds = 10 - successful_jobs_history_limit = 10 - job_template { - metadata {} - spec { - backoff_limit = 2 - ttl_seconds_after_finished = 10 - template { - metadata {} - spec { - container { - name = "hello" - image = "busybox" - command = ["/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster"] - } - } - } - } - } - } -} -``` +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.empty_dir` + +Optional: + +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.iscsi` + +Required: + +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). + +Optional: + +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.local` + +Optional: -## Argument Reference +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local -The following arguments are supported: -* `metadata` - (Required) Standard resource's metadata. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `spec` - (Required) Spec defines the behavior of a CronJob. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + +### Nested Schema for `spec.job_template.spec.template.spec.volume.nfs` -## Nested Blocks +Required: -### `metadata` +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -#### Arguments +Optional: -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. + +### Nested Schema for `spec.job_template.spec.template.spec.volume.persistent_volume_claim` -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +Optional: -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. -#### Attributes -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + +### Nested Schema for `spec.job_template.spec.template.spec.volume.photon_persistent_disk` -### `spec` +Required: -#### Arguments +- `pd_id` (String) ID that identifies Photon Controller persistent disk -* `concurrency_policy` - (Optional) Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one -* `failed_jobs_history_limit` - (Optional) The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. -* `job_template` - (Required) Specifies the job that will be created when executing a CronJob. -* `schedule` - (Required) The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. -* `timezone` - (Optional) The time zone for the given schedule. If not specified, this will rely on the time zone of the kube-controller-manager process. -* `starting_deadline_seconds` - (Optional) Deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. -* `successful_jobs_history_limit` - (Optional) The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. -* `suspend` - (Optional) This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. +Optional: -### `job_template` +- `fs_type` (String) 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. -#### Arguments -* `metadata` - (Required) Standard object's metadata of the jobs created from this template. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Specification of the desired behavior of the job. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected` -### `metadata` +Required: -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources)) -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. +Optional: -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -### `spec` + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources` -#### Arguments +Optional: -* `active_deadline_seconds` - (Optional) Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. -* `backoff_limit` - (Optional) Specifies the number of retries before marking this job failed. Defaults to 6 -* `completions` - (Optional) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `manual_selector` - (Optional) Controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector -* `pod_failure_policy` - (Optional) Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure. -* `parallelism` - (Optional) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when `((.spec.completions - .status.successful) < .spec.parallelism)`, i.e. when the work left to do is less than max parallelism. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `selector` - (Optional) A label query over pods that should match the pod count. Normally, the system sets this field for you. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors -* `template` - (Optional) Describes the pod that will be created when executing a job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `ttl_seconds_after_finished` - (Optional) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--service_account_token)) -### `pod_failure_policy` + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.config_map` -#### Arguments +Optional: -* `rule` - (Required) A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. -### `rule` + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.config_map.items` -#### Arguments +Optional: -* `action` - (Optional) Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. -* `on_exit_codes` - (Optional) Represents the requirement on the container exit codes. -* `on_pod_condition` - (Optional) Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -### `on_exit_codes` -#### Arguments -* `container_name` - (Optional) Restricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template. -* `operator` - (Optional) Represents the relationship between the container exit code(s) and the specified values. -* `values` - (Required) Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.downward_api` -### `on_pod_condition` +Optional: -#### Arguments +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--downward_api--items)) -* `status` - (Optional) Specifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True. -* `type` - (Optional) Specifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type. + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.downward_api.items` -### `selector` +Required: -#### Arguments +- `path` (String) 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 '..' -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. +Optional: -### `template` +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) -#### Arguments + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.downward_api.items.field_ref` -These arguments are the same as the for the `spec` block of a Pod. +Optional: -Please see the [Pod resource](pod.html#spec) for reference. +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.secret` + +Optional: + +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.job_template.spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + +### Nested Schema for `spec.job_template.spec.pod_failure_policy` + +Required: + +- `rule` (Block List, Min: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--job_template--spec--pod_failure_policy--rule)) + + +### Nested Schema for `spec.job_template.spec.pod_failure_policy.rule` + +Optional: + +- `action` (String) +- `on_exit_codes` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--job_template--spec--pod_failure_policy--rule--on_exit_codes)) +- `on_pod_condition` (Block List) (see [below for nested schema](#nestedblock--spec--job_template--spec--pod_failure_policy--rule--on_pod_condition)) + + +### Nested Schema for `spec.job_template.spec.pod_failure_policy.rule.on_exit_codes` + +Required: + +- `values` (List of Number) + +Optional: + +- `container_name` (String) +- `operator` (String) + + + +### Nested Schema for `spec.job_template.spec.pod_failure_policy.rule.on_pod_condition` + +Optional: + +- `status` (String) +- `type` (String) + + + + + +### Nested Schema for `spec.job_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--job_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.job_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `delete` (String) + + + + +## Example Usage + +```terraform +resource "kubernetes_cron_job_v1" "demo" { + metadata { + name = "demo" + } + spec { + concurrency_policy = "Replace" + failed_jobs_history_limit = 5 + schedule = "1 0 * * *" + timezone = "Etc/UTC" + starting_deadline_seconds = 10 + successful_jobs_history_limit = 10 + job_template { + metadata {} + spec { + backoff_limit = 2 + ttl_seconds_after_finished = 10 + template { + metadata {} + spec { + container { + name = "hello" + image = "busybox" + command = ["/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster"] + } + } + } + } + } + } +} +``` diff --git a/docs/resources/csi_driver.md b/docs/resources/csi_driver.md index ba72b94d30..f7eb1a771c 100644 --- a/docs/resources/csi_driver.md +++ b/docs/resources/csi_driver.md @@ -9,57 +9,68 @@ description: |- The [Container Storage Interface](https://kubernetes-csi.github.io/docs/introduction.html) (CSI) is a standard for exposing arbitrary block and file storage systems to containerized workloads on Container Orchestration Systems (COs) like Kubernetes. -## Example Usage + +## Schema -```terraform -resource "kubernetes_csi_driver" "example" { - metadata { - name = "terraform-example" - } +### Required - spec { - attach_required = true - pod_info_on_mount = true - volume_lifecycle_modes = ["Ephemeral"] - } -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard csi driver's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `spec` (Block List, Max: 1) Spec of the CSIDriver (see [below for nested schema](#nestedblock--spec)) + +### Read-Only -## Argument Reference +- `id` (String) The ID of this resource. -The following arguments are supported: + +### Nested Schema for `metadata` -* `metadata` - (Required) Standard CSI driver's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) The Specification of the CSI Driver. +Optional: -## Nested Blocks +- `annotations` (Map of String) An unstructured key value map stored with the csi driver that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the csi driver. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the csi driver, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `metadata` +Read-Only: -#### Arguments +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this csi driver that can be used by clients to determine when csi driver has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this csi driver. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `annotations` - (Optional) An unstructured key value map stored with the csi driver that may be used to store arbitrary metadata. -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) + +### Nested Schema for `spec` -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the csi driver. May match selectors of replication controllers and services. +Required: -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +- `attach_required` (Boolean) Indicates if the CSI volume driver requires an attach operation -### `spec` +Optional: -#### Arguments +- `pod_info_on_mount` (Boolean) Indicates that the CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations +- `volume_lifecycle_modes` (List of String) Defines what kind of volumes this CSI volume driver supports -* `attach_required` - (Required) Indicates if the CSI volume driver requires an attachment operation. -* `pod_info_on_mount` - (Optional) Indicates that the CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. -* `volume_lifecycle_modes` - (Optional) A list of volume types the CSI volume driver supports. values can be `Persistent` and `Ephemeral`. -#### Attributes -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this csi driver that can be used by clients to determine when csi driver has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this csi driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) + +## Example Usage + +```terraform +resource "kubernetes_csi_driver" "example" { + metadata { + name = "terraform-example" + } + + spec { + attach_required = true + pod_info_on_mount = true + volume_lifecycle_modes = ["Ephemeral"] + } +} +``` ## Import diff --git a/docs/resources/csi_driver_v1.md b/docs/resources/csi_driver_v1.md index fd3c8c202a..6d80a5c56e 100644 --- a/docs/resources/csi_driver_v1.md +++ b/docs/resources/csi_driver_v1.md @@ -9,57 +9,68 @@ description: |- The [Container Storage Interface](https://kubernetes-csi.github.io/docs/introduction.html) (CSI) is a standard for exposing arbitrary block and file storage systems to containerized workloads on Container Orchestration Systems (COs) like Kubernetes. -## Example Usage + +## Schema -```terraform -resource "kubernetes_csi_driver_v1" "example" { - metadata { - name = "terraform-example" - } +### Required - spec { - attach_required = true - pod_info_on_mount = true - volume_lifecycle_modes = ["Ephemeral"] - } -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard csi driver's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `spec` (Block List, Max: 1) Spec of the CSIDriver (see [below for nested schema](#nestedblock--spec)) + +### Read-Only -## Argument Reference +- `id` (String) The ID of this resource. -The following arguments are supported: + +### Nested Schema for `metadata` -* `metadata` - (Required) Standard CSI driver's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) The Specification of the CSI Driver. +Optional: -## Nested Blocks +- `annotations` (Map of String) An unstructured key value map stored with the csi driver that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the csi driver. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the csi driver, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `metadata` +Read-Only: -#### Arguments +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this csi driver that can be used by clients to determine when csi driver has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this csi driver. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `annotations` - (Optional) An unstructured key value map stored with the csi driver that may be used to store arbitrary metadata. -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) + +### Nested Schema for `spec` -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the csi driver. May match selectors of replication controllers and services. +Required: -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +- `attach_required` (Boolean) Indicates if the CSI volume driver requires an attach operation -### `spec` +Optional: -#### Arguments +- `pod_info_on_mount` (Boolean) Indicates that the CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations +- `volume_lifecycle_modes` (List of String) Defines what kind of volumes this CSI volume driver supports -* `attach_required` - (Required) Indicates if the CSI volume driver requires an attachment operation. -* `pod_info_on_mount` - (Optional) Indicates that the CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. -* `volume_lifecycle_modes` - (Optional) A list of volume types the CSI volume driver supports. values can be `Persistent` and `Ephemeral`. -#### Attributes -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this csi driver that can be used by clients to determine when csi driver has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this csi driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) + +## Example Usage + +```terraform +resource "kubernetes_csi_driver_v1" "example" { + metadata { + name = "terraform-example" + } + + spec { + attach_required = true + pod_info_on_mount = true + volume_lifecycle_modes = ["Ephemeral"] + } +} +``` ## Import diff --git a/docs/resources/daemon_set_v1.md b/docs/resources/daemon_set_v1.md index f55e8889b3..360ade82fb 100644 --- a/docs/resources/daemon_set_v1.md +++ b/docs/resources/daemon_set_v1.md @@ -9,883 +9,2316 @@ description: |- A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created. -## Example Usage + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard daemonset's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the specification of the desired behavior of the daemonset. More info: https://v1-9.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#daemonset-v1-apps (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_rollout` (Boolean) Wait for the rollout of the deployment to complete. Defaults to true. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the daemonset that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the daemonset. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the daemonset, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the daemonset must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this daemonset that can be used by clients to determine when daemonset has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this daemonset. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `template` (Block List, Min: 1, Max: 1) An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/#pod-template (see [below for nested schema](#nestedblock--spec--template)) + +Optional: + +- `min_ready_seconds` (Number) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) +- `revision_history_limit` (Number) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. +- `selector` (Block List, Max: 1) A label query over pods that are managed by the DaemonSet. (see [below for nested schema](#nestedblock--spec--selector)) +- `strategy` (Block List, Max: 1) The deployment strategy used to replace existing pods with new ones. (see [below for nested schema](#nestedblock--spec--strategy)) + + +### Nested Schema for `spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard daemon set's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--template--metadata)) + +Optional: + +- `spec` (Block List, Max: 1) Spec of the pods owned by the daemon set (see [below for nested schema](#nestedblock--spec--template--spec)) + + +### Nested Schema for `spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the daemon set that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the daemon set. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the daemon set, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the daemon set must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this daemon set that can be used by clients to determine when daemon set has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this daemon set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume)) + + +### Nested Schema for `spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: -```terraform -resource "kubernetes_daemon_set_v1" "example" { - metadata { - name = "terraform-example" - namespace = "something" - labels = { - test = "MyExampleApp" - } - } +- `service` (String) 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. - spec { - selector { - match_labels = { - test = "MyExampleApp" - } - } - template { - metadata { - labels = { - test = "MyExampleApp" - } - } + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get` - spec { - container { - image = "nginx:1.21.6" - name = "example" +Optional: - resources { - limits = { - cpu = "0.5" - memory = "512Mi" - } - requests = { - cpu = "250m" - memory = "50Mi" - } - } +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. - liveness_probe { - http_get { - path = "/" - port = 80 + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get.http_header` - http_header { - name = "X-Custom-Header" - value = "Awesome" - } - } +Optional: - initial_delay_seconds = 3 - period_seconds = 3 - } +- `name` (String) The header field name +- `value` (String) The header field value - } - } - } - } -} -``` -## Argument Reference -The following arguments are supported: + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.tcp_socket` -* `metadata` - (Required) Standard daemonset's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the daemonset. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the deployment to successfully roll out. Defaults to `true`. +Required: -## Nested Blocks +- `port` (String) 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. -### `metadata` -#### Arguments -* `annotations` - (Optional) An unstructured key value map stored with the deployment that may be used to store arbitrary metadata. + +### Nested Schema for `spec.template.spec.init_container.port` -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +Required: -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the deployment. +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). **Must match `selector`**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +Optional: -* `name` - (Optional) Name of the deployment, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the deployment must be unique. +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". -#### Attributes -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this deployment that can be used by clients to determine when deployment has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this deployment. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) + +### Nested Schema for `spec.template.spec.init_container.readiness_probe` -### `spec` +Optional: -#### Arguments +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `revision_history_limit` - (Optional) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. -* `strategy` - (Optional) The update strategy to use to replace existing pods with new ones. -* `selector` - (Optional) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this deployment. **Must match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) -* `template` - (Required) Describes the pod that will be created per Node. This takes precedence over a TemplateRef. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#pod-template) + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.exec` -### `strategy` +Optional: -#### Arguments +- `command` (List of String) 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. 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. -* `type` - Type of daemon set update. Can be 'RollingUpdate' or 'OnDelete'. Default is 'RollingUpdate'. -* `rolling_update` - Rolling update config params. Present only if type = 'RollingUpdate'. -### `rolling_update` + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.grpc` -#### Arguments +Required: -* `max_unavailable` - The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. -### `template` +Optional: -#### Arguments +- `service` (String) 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. -* `metadata` - (Required) Standard object's metadata. For more info see https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata. -* `spec` - (Required) Specification of the desired behavior of the pod. For more info see https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. -### template `metadata` + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get` -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: +Optional: -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get.http_header` -Please see the [Pod resource](pod_v1.html#metadata) for reference. +Optional: -### template `spec` +- `name` (String) The header field name +- `value` (String) The header field value -#### Arguments -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true`. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) -### `affinity` + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.tcp_socket` -#### Arguments +Required: -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) +- `port` (String) 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. -### `node_affinity` -#### Arguments -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. + +### Nested Schema for `spec.template.spec.init_container.resources` -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +Optional: -### `required_during_scheduling_ignored_during_execution` +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -#### Arguments -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. + +### Nested Schema for `spec.template.spec.init_container.security_context` -## `node_selector_term` +Optional: -#### Arguments +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--seccomp_profile)) -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. + +### Nested Schema for `spec.template.spec.init_container.security_context.capabilities` -* `match_fields` - (Optional) A list of node selector requirements by node's fields. +Optional: -### `match_expressions` / `match_fields` +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities -#### Arguments -* `key` - (Required) The label key that the selector applies to. + +### Nested Schema for `spec.template.spec.init_container.security_context.se_linux_options` -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +Optional: -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. -### `preferred_during_scheduling_ignored_during_execution` -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.security_context.seccomp_profile` -* `preference` - (Required) A node selector term, associated with the corresponding weight. +Optional: -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. -### `preference` -#### Arguments -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. + +### Nested Schema for `spec.template.spec.init_container.startup_probe` -* `match_fields` - (Optional) A list of node selector requirements by node's fields. +Optional: -## `match_expressions` / `match_fields` +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.startup_probe.exec` -* `key` - (Required) The label key that the selector applies to. +Optional: -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `command` (List of String) 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. 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. -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. -### `pod_affinity` + +### Nested Schema for `spec.template.spec.init_container.startup_probe.grpc` -#### Arguments +Required: -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +Optional: -### `pod_anti_affinity` +- `service` (String) 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. -#### Arguments -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get` -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +Optional: -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get.http_header` -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Required) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. +Optional: -### `preferred_during_scheduling_ignored_during_execution` +- `name` (String) The header field name +- `value` (String) The header field value -#### Arguments -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. -### `container` + +### Nested Schema for `spec.template.spec.init_container.startup_probe.tcp_socket` -#### Arguments +Required: -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. +- `port` (String) 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. -### `aws_elastic_block_store` -#### Arguments -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) + +### Nested Schema for `spec.template.spec.init_container.volume_mount` -### `azure_disk` +Required: -#### Arguments +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +Optional: -### `azure_file` +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -#### Arguments -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name -### `capabilities` + +### Nested Schema for `spec.template.spec.os` -#### Arguments +Required: -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. -### `ceph_fs` -#### Arguments + +### Nested Schema for `spec.template.spec.readiness_gate` -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is / -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. +Required: -### `cinder` +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. -#### Arguments -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. + +### Nested Schema for `spec.template.spec.security_context` -### `config_map` +Optional: -#### Arguments +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--windows_options)) -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) + +### Nested Schema for `spec.template.spec.security_context.se_linux_options` -### `config_map_ref` +Optional: -#### Arguments +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined -### `config_map_key_ref` + +### Nested Schema for `spec.template.spec.security_context.seccomp_profile` -#### Arguments +Optional: -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap or its key must be defined +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. -### `dns_config` -#### Arguments + +### Nested Schema for `spec.template.spec.security_context.sysctl` -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. +Required: -The `option` block supports the following: +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. -### `downward_api` + +### Nested Schema for `spec.template.spec.security_context.windows_options` -#### Arguments +Optional: -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. -### `empty_dir` -#### Arguments -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). + +### Nested Schema for `spec.template.spec.toleration` -### `env` +Optional: -#### Arguments +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value -### `env_from` + +### Nested Schema for `spec.template.spec.topology_spread_constraint` -#### Arguments +Optional: -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. -### `exec` + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector` -#### Arguments +Optional: -* `command` - (Optional) 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. 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. +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. -### `fc` + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector.match_expressions` -#### Arguments +Optional: -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. -### `field_ref` -#### Arguments -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version -### `flex_volume` + +### Nested Schema for `spec.template.spec.volume` -#### Arguments +Optional: -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--vsphere_volume)) -### `flocker` + +### Nested Schema for `spec.template.spec.volume.aws_elastic_block_store` -#### Arguments +Required: -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore -### `gce_persistent_disk` +Optional: -#### Arguments +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -### `git_repo` + +### Nested Schema for `spec.template.spec.volume.azure_disk` -#### Arguments +Required: -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage -### `glusterfs` +Optional: -#### Arguments +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -### `grpc` + +### Nested Schema for `spec.template.spec.volume.azure_file` -#### Arguments +Required: -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name -### `host_aliases` +Optional: -#### Arguments +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. -### `host_path` + +### Nested Schema for `spec.template.spec.volume.ceph_fs` -#### Arguments +Required: -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -### `http_get` +Optional: -#### Arguments +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. + +### Nested Schema for `spec.template.spec.volume.ceph_fs.secret_ref` -### `http_header` +Optional: -#### Arguments +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value -### `image_pull_secrets` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.cinder` -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Required: -### `iscsi` +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md -#### Arguments +Optional: -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md -### `items` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.config_map` -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. +Optional: -### `lifecycle` +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. -#### Arguments + +### Nested Schema for `spec.template.spec.volume.config_map.items` -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) +Optional: -### `liveness_probe` +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -#### Arguments -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -### `nfs` + +### Nested Schema for `spec.template.spec.volume.csi` -#### Arguments +Required: -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi -### `persistent_volume_claim` +Optional: -#### Arguments +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. + +### Nested Schema for `spec.template.spec.volume.csi.node_publish_secret_ref` -### `photon_persistent_disk` +Optional: -#### Arguments +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk -### `port` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.downward_api` -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". +Optional: -### `post_start` +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items)) -#### Arguments + +### Nested Schema for `spec.template.spec.volume.downward_api.items` -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported +Required: -### `pre_stop` +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' -#### Arguments +Optional: -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--resource_field_ref)) -### `quobyte` + +### Nested Schema for `spec.template.spec.volume.downward_api.items.field_ref` -#### Arguments +Optional: -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version -### `rbd` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.downward_api.items.resource_field_ref` -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. +Required: -### `readiness_probe` +- `container_name` (String) +- `resource` (String) Resource to select -#### Arguments +Optional: -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) +- `divisor` (String) -### `resources` -#### Arguments -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. + +### Nested Schema for `spec.template.spec.volume.empty_dir` -Please, look at the example below: +Optional: -```terraform -resources { - limits = {} - requests = {} -} -``` +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice -### `resource_field_ref` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.iscsi` -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". +Required: -### `seccomp_profile` +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). -#### Attributes +Optional: -* `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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. -### `se_linux_options` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.local` -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. +Optional: -### `secret` +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local -#### Arguments -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) + +### Nested Schema for `spec.template.spec.volume.nfs` -The `items` block supports the following: +Required: -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -### `secret_ref` +Optional: -#### Arguments +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined -### `secret_key_ref` + +### Nested Schema for `spec.template.spec.volume.persistent_volume_claim` -#### Arguments +Optional: -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. -### `secret_ref` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.photon_persistent_disk` -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Required: -### container `security_context` +- `pd_id` (String) ID that identifies Photon Controller persistent disk -#### Arguments +Optional: -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. +- `fs_type` (String) 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. -### `capabilities` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected` -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. +Required: -### pod `security_context` +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources)) -#### Arguments +Optional: -* `fs_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -##### Sysctl + +### Nested Schema for `spec.template.spec.volume.projected.sources` -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. +Optional: -### `tcp_socket` +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--service_account_token)) -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map` -* `port` - (Required) 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. +Optional: -### `value_from` +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map.items` -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. +Optional: -### `toleration` +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -#### Arguments -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. -### `projected` + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api` -#### Arguments +Optional: -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items)) -### `sources` + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items` -#### Arguments +Required: -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). +- `path` (String) 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 '..' -### `service_account_token` +Optional: -#### Arguments +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.field_ref` -### `volume` +Optional: -#### Arguments +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine -### `volume_mount` + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` -#### Arguments +Required: -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) +- `container_name` (String) +- `resource` (String) Resource to select -### `vsphere_volume` +Optional: -#### Arguments +- `divisor` (String) -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk -### `ephemeral` -#### Arguments -* `volume_claim_template` - (Required) 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. + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret` -### `volume_claim_template` +Optional: -#### Arguments +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret.items` -## Timeouts +Optional: -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_daemon_set_v1` resource: +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -* `create` - (Default `10 minutes`) Used for creating new controller -* `update` - (Default `10 minutes`) Used for updating a controller -* `delete` - (Default `10 minutes`) Used for destroying a controller + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.strategy` + +Optional: + +- `rolling_update` (Block List, Max: 1) Rolling update config params. Present only if type = 'RollingUpdate'. (see [below for nested schema](#nestedblock--spec--strategy--rolling_update)) +- `type` (String) Type of deployment. Can be 'RollingUpdate' or 'OnDelete'. Default is RollingUpdate. + + +### Nested Schema for `spec.strategy.rolling_update` + +Optional: + +- `max_unavailable` (String) The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `update` (String) + + + + +## Example Usage + +```terraform +resource "kubernetes_daemon_set_v1" "example" { + metadata { + name = "terraform-example" + namespace = "something" + labels = { + test = "MyExampleApp" + } + } + + spec { + selector { + match_labels = { + test = "MyExampleApp" + } + } + + template { + metadata { + labels = { + test = "MyExampleApp" + } + } + + spec { + container { + image = "nginx:1.21.6" + name = "example" + + resources { + limits = { + cpu = "0.5" + memory = "512Mi" + } + requests = { + cpu = "250m" + memory = "50Mi" + } + } + + liveness_probe { + http_get { + path = "/" + port = 80 + + http_header { + name = "X-Custom-Header" + value = "Awesome" + } + } + + initial_delay_seconds = 3 + period_seconds = 3 + } + + } + } + } + } +} +``` ## Import diff --git a/docs/resources/daemonset.md b/docs/resources/daemonset.md index 57660f69f5..8de79f5301 100644 --- a/docs/resources/daemonset.md +++ b/docs/resources/daemonset.md @@ -5,899 +5,2320 @@ description: |- A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created. --- -# kubernetes_daemonset +# kubernetes_daemonset A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created. -## Example Usage + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard daemonset's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the specification of the desired behavior of the daemonset. More info: https://v1-9.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#daemonset-v1-apps (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_rollout` (Boolean) Wait for the rollout of the deployment to complete. Defaults to true. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the daemonset that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the daemonset. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the daemonset, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the daemonset must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this daemonset that can be used by clients to determine when daemonset has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this daemonset. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `template` (Block List, Min: 1, Max: 1) An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/#pod-template (see [below for nested schema](#nestedblock--spec--template)) + +Optional: + +- `min_ready_seconds` (Number) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) +- `revision_history_limit` (Number) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. +- `selector` (Block List, Max: 1) A label query over pods that are managed by the DaemonSet. (see [below for nested schema](#nestedblock--spec--selector)) +- `strategy` (Block List, Max: 1) The deployment strategy used to replace existing pods with new ones. (see [below for nested schema](#nestedblock--spec--strategy)) + + +### Nested Schema for `spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard daemon set's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--template--metadata)) + +Optional: + +- `spec` (Block List, Max: 1) Spec of the pods owned by the daemon set (see [below for nested schema](#nestedblock--spec--template--spec)) + + +### Nested Schema for `spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the daemon set that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the daemon set. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the daemon set, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the daemon set must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this daemon set that can be used by clients to determine when daemon set has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this daemon set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume)) + + +### Nested Schema for `spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.grpc` + +Required: -```terraform -resource "kubernetes_daemonset" "example" { - metadata { - name = "terraform-example" - namespace = "something" - labels = { - test = "MyExampleApp" - } - } +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. - spec { - selector { - match_labels = { - test = "MyExampleApp" - } - } +Optional: - template { - metadata { - labels = { - test = "MyExampleApp" - } - } +- `service` (String) 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. - spec { - container { - image = "nginx:1.21.6" - name = "example" - resources { - limits = { - cpu = "0.5" - memory = "512Mi" - } - requests = { - cpu = "250m" - memory = "50Mi" - } - } + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get` - liveness_probe { - http_get { - path = "/" - port = 80 +Optional: - http_header { - name = "X-Custom-Header" - value = "Awesome" - } - } +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. - initial_delay_seconds = 3 - period_seconds = 3 - } + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get.http_header` - } - } - } - } -} -``` +Optional: -## Argument Reference +- `name` (String) The header field name +- `value` (String) The header field value -The following arguments are supported: -* `metadata` - (Required) Standard daemonset's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the daemonset. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the deployment to successfully roll out. Defaults to `true`. -## Nested Blocks + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.tcp_socket` -### `metadata` +Required: -#### Arguments +- `port` (String) 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. -* `annotations` - (Optional) An unstructured key value map stored with the deployment that may be used to store arbitrary metadata. -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the deployment. + +### Nested Schema for `spec.template.spec.init_container.port` -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). **Must match `selector`**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +Required: -* `name` - (Optional) Name of the deployment, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the deployment must be unique. +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -#### Attributes +Optional: -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this deployment that can be used by clients to determine when deployment has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this deployment. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". -### `spec` -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.readiness_probe` -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `revision_history_limit` - (Optional) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. -* `strategy` - (Optional) The update strategy to use to replace existing pods with new ones. -* `selector` - (Optional) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this deployment. **Must match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) -* `template` - (Required) Describes the pod that will be created per Node. This takes precedence over a TemplateRef. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#pod-template) +Optional: -### `strategy` +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.exec` -* `type` - Type of daemon set update. Can be 'RollingUpdate' or 'OnDelete'. Default is 'RollingUpdate'. -* `rolling_update` - Rolling update config params. Present only if type = 'RollingUpdate'. +Optional: -### `rolling_update` +- `command` (List of String) 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. 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. -#### Arguments -* `max_unavailable` - The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.grpc` -### `template` +Required: -#### Arguments +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `metadata` - (Required) Standard object's metadata. For more info see https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata. -* `spec` - (Required) Specification of the desired behavior of the pod. For more info see https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. +Optional: -### template `metadata` +- `service` (String) 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. -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get` -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. +Optional: -Please see the [Pod resource](pod_v1.html#metadata) for reference. +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. -### template `spec` + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get.http_header` -#### Arguments +Optional: -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true`. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) +- `name` (String) The header field name +- `value` (String) The header field value -### `affinity` -#### Arguments -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.tcp_socket` -### `node_affinity` +Required: -#### Arguments +- `port` (String) 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. -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. -### `required_during_scheduling_ignored_during_execution` + +### Nested Schema for `spec.template.spec.init_container.resources` -#### Arguments +Optional: -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -## `node_selector_term` -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.security_context` -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. +Optional: -* `match_fields` - (Optional) A list of node selector requirements by node's fields. +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--seccomp_profile)) -### `match_expressions` / `match_fields` + +### Nested Schema for `spec.template.spec.init_container.security_context.capabilities` -#### Arguments +Optional: -* `key` - (Required) The label key that the selector applies to. +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. + +### Nested Schema for `spec.template.spec.init_container.security_context.se_linux_options` -### `preferred_during_scheduling_ignored_during_execution` +Optional: -#### Arguments +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. -* `preference` - (Required) A node selector term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + +### Nested Schema for `spec.template.spec.init_container.security_context.seccomp_profile` -### `preference` +Optional: -#### Arguments +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. -* `match_fields` - (Optional) A list of node selector requirements by node's fields. -## `match_expressions` / `match_fields` + +### Nested Schema for `spec.template.spec.init_container.startup_probe` -#### Arguments +Optional: -* `key` - (Required) The label key that the selector applies to. +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + +### Nested Schema for `spec.template.spec.init_container.startup_probe.exec` -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. +Optional: -### `pod_affinity` +- `command` (List of String) 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. 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. -#### Arguments -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. + +### Nested Schema for `spec.template.spec.init_container.startup_probe.grpc` -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +Required: -### `pod_anti_affinity` +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. -#### Arguments +Optional: -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. +- `service` (String) 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. -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get` -#### Arguments +Optional: -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Optional) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. -### `preferred_during_scheduling_ignored_during_execution` + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get.http_header` -#### Arguments +Optional: -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. +- `name` (String) The header field name +- `value` (String) The header field value -### `container` -#### Arguments -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + +### Nested Schema for `spec.template.spec.init_container.startup_probe.tcp_socket` -### `aws_elastic_block_store` +Required: -#### Arguments +- `port` (String) 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. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -### `azure_disk` -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.volume_mount` -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +Required: -### `azure_file` +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. -#### Arguments +Optional: -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -### `capabilities` -#### Arguments -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities + +### Nested Schema for `spec.template.spec.os` -### `ceph_fs` +Required: -#### Arguments +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is / -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -### `cinder` + +### Nested Schema for `spec.template.spec.readiness_gate` -#### Arguments +Required: -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. -### `config_map` -#### Arguments + +### Nested Schema for `spec.template.spec.security_context` -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Optional: -### `config_map_ref` +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--windows_options)) -#### Arguments + +### Nested Schema for `spec.template.spec.security_context.se_linux_options` -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined +Optional: -### `config_map_key_ref` +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. -#### Arguments -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap or its key must be defined + +### Nested Schema for `spec.template.spec.security_context.seccomp_profile` -### `csi` +Optional: -#### Arguments +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. -* `driver` - (Required) the name of the volume driver to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_attributes` - (Optional) Attributes of the volume to publish. -* `fs_type` - (Optional) Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. `ext4`, `xfs`, `ntfs`. -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to `true`. If omitted, the default is `false`. -* `node_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -### `dns_config` + +### Nested Schema for `spec.template.spec.security_context.sysctl` -#### Arguments +Required: -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. -The `option` block supports the following: -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. + +### Nested Schema for `spec.template.spec.security_context.windows_options` -### `downward_api` +Optional: -#### Arguments +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. -### `empty_dir` -#### Arguments + +### Nested Schema for `spec.template.spec.toleration` -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). +Optional: -### `env` +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. -#### Arguments -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value + +### Nested Schema for `spec.template.spec.topology_spread_constraint` -### `env_from` +Optional: -#### Arguments +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector` -### `exec` +Optional: -#### Arguments +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. -* `command` - (Optional) 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. 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. + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector.match_expressions` -### `fc` +Optional: -#### Arguments +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) -### `field_ref` -#### Arguments -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version + +### Nested Schema for `spec.template.spec.volume` -### `flex_volume` +Optional: -#### Arguments +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--vsphere_volume)) -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. + +### Nested Schema for `spec.template.spec.volume.aws_elastic_block_store` -### `flocker` +Required: -#### Arguments +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset +Optional: -### `gce_persistent_disk` +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore -#### Arguments -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) + +### Nested Schema for `spec.template.spec.volume.azure_disk` -### `git_repo` +Required: -#### Arguments +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. +Optional: -### `glusterfs` +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -#### Arguments -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. + +### Nested Schema for `spec.template.spec.volume.azure_file` -### `grpc` +Required: -#### Arguments +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. +Optional: -### `host_aliases` +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. -#### Arguments -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. + +### Nested Schema for `spec.template.spec.volume.ceph_fs` -### `host_path` +Required: -#### Arguments +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) +Optional: -### `http_get` +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -#### Arguments + +### Nested Schema for `spec.template.spec.volume.ceph_fs.secret_ref` -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. +Optional: -### `http_header` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value -### `image_pull_secrets` + +### Nested Schema for `spec.template.spec.volume.cinder` -#### Arguments +Required: -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md -### `iscsi` +Optional: -#### Arguments +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). -### `items` + +### Nested Schema for `spec.template.spec.volume.config_map` -#### Arguments +Optional: -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. -### `lifecycle` + +### Nested Schema for `spec.template.spec.volume.config_map.items` -#### Arguments +Optional: -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -### `liveness_probe` -#### Arguments -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) + +### Nested Schema for `spec.template.spec.volume.csi` -### `nfs` +Required: -#### Arguments +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) +Optional: -### `persistent_volume_claim` +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. -#### Arguments + +### Nested Schema for `spec.template.spec.volume.csi.node_publish_secret_ref` -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. +Optional: -### `photon_persistent_disk` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk -### `port` + +### Nested Schema for `spec.template.spec.volume.downward_api` -#### Arguments +Optional: -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items)) -### `post_start` + +### Nested Schema for `spec.template.spec.volume.downward_api.items` -#### Arguments +Required: -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' -### `pre_stop` +Optional: -#### Arguments +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--resource_field_ref)) -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported + +### Nested Schema for `spec.template.spec.volume.downward_api.items.field_ref` -### `quobyte` +Optional: -#### Arguments +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. -### `rbd` + +### Nested Schema for `spec.template.spec.volume.downward_api.items.resource_field_ref` -#### Arguments +Required: -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. +- `container_name` (String) +- `resource` (String) Resource to select -### `readiness_probe` +Optional: -#### Arguments +- `divisor` (String) -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -### `resources` -#### Arguments -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. + +### Nested Schema for `spec.template.spec.volume.empty_dir` -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. +Optional: -Please, look at the example below: +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice -```terraform -resources { - limits = {} - requests = {} -} -``` -### `resource_field_ref` + +### Nested Schema for `spec.template.spec.volume.iscsi` -#### Arguments +Required: -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). -### `seccomp_profile` +Optional: -#### Attributes +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. -### `se_linux_options` + +### Nested Schema for `spec.template.spec.volume.local` -#### Arguments +Optional: -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local -### `secret` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.nfs` -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) +Required: -The `items` block supports the following: +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. +Optional: -### `secret_ref` +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -#### Arguments -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined + +### Nested Schema for `spec.template.spec.volume.persistent_volume_claim` -### `secret_key_ref` +Optional: -#### Arguments +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined -### `secret_ref` + +### Nested Schema for `spec.template.spec.volume.photon_persistent_disk` -#### Arguments +Required: -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `pd_id` (String) ID that identifies Photon Controller persistent disk -### container `security_context` +Optional: -#### Arguments +- `fs_type` (String) 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. -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `fs_group_change_policy` - 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. -### `capabilities` + +### Nested Schema for `spec.template.spec.volume.projected` -#### Arguments +Required: -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources)) -### pod `security_context` +Optional: -#### Arguments +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `fs_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. + +### Nested Schema for `spec.template.spec.volume.projected.sources` -##### Sysctl +Optional: -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--service_account_token)) -### `tcp_socket` + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map` -#### Arguments +Optional: -* `port` - (Required) 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. -### `value_from` + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map.items` -#### Arguments +Optional: -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -### `toleration` -#### Arguments -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api` -### `projected` +Optional: -#### Arguments +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items)) -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items` -### `sources` +Required: -#### Arguments +- `path` (String) 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 '..' -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). +Optional: -### `service_account_token` +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.field_ref` -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. +Optional: -### `volume` +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version -#### Arguments -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `csi` - (Optional) CSI represents storage that is handled by an external CSI driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi) -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` -### `volume_mount` +Required: -#### Arguments +- `container_name` (String) +- `resource` (String) Resource to select -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) +Optional: -### `vsphere_volume` +- `divisor` (String) -#### Arguments -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk -### `ephemeral` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret` -* `volume_claim_template` - (Required) 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. +Optional: -### `volume_claim_template` +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret.items` -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. +Optional: -## Timeouts +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_daemonset` resource: -* `create` - (Default `10 minutes`) Used for creating new controller -* `update` - (Default `10 minutes`) Used for updating a controller -* `delete` - (Default `10 minutes`) Used for destroying a controller + + +### Nested Schema for `spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.strategy` + +Optional: + +- `rolling_update` (Block List, Max: 1) Rolling update config params. Present only if type = 'RollingUpdate'. (see [below for nested schema](#nestedblock--spec--strategy--rolling_update)) +- `type` (String) Type of deployment. Can be 'RollingUpdate' or 'OnDelete'. Default is RollingUpdate. + + +### Nested Schema for `spec.strategy.rolling_update` + +Optional: + +- `max_unavailable` (String) The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `update` (String) + + + + +## Example Usage + +```terraform +resource "kubernetes_daemonset" "example" { + metadata { + name = "terraform-example" + namespace = "something" + labels = { + test = "MyExampleApp" + } + } + + spec { + selector { + match_labels = { + test = "MyExampleApp" + } + } + + template { + metadata { + labels = { + test = "MyExampleApp" + } + } + + spec { + container { + image = "nginx:1.21.6" + name = "example" + + resources { + limits = { + cpu = "0.5" + memory = "512Mi" + } + requests = { + cpu = "250m" + memory = "50Mi" + } + } + + liveness_probe { + http_get { + path = "/" + port = 80 + + http_header { + name = "X-Custom-Header" + value = "Awesome" + } + } + + initial_delay_seconds = 3 + period_seconds = 3 + } + + } + } + } + } +} +``` ## Import diff --git a/docs/resources/default_service_account.md b/docs/resources/default_service_account.md index 74309d3682..7188692041 100644 --- a/docs/resources/default_service_account.md +++ b/docs/resources/default_service_account.md @@ -11,79 +11,86 @@ Kubernetes creates a "default" service account in each namespace. This is the se The `kubernetes_default_service_account` resource behaves differently from normal resources. The service account is created by a Kubernetes controller and Terraform "adopts" it into management. This resource should only be used once per namespace. -## Example Usage + +## Schema -```terraform -resource "kubernetes_default_service_account" "example" { - metadata { - namespace = "terraform-example" - } - secret { - name = "${kubernetes_secret.example.metadata.0.name}" - } -} +### Required -resource "kubernetes_secret" "example" { - metadata { - name = "terraform-example" - } -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard service account's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional -## Argument Reference +- `automount_service_account_token` (Boolean) Enable automatic mounting of the service account token +- `image_pull_secret` (Block Set) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--image_pull_secret)) +- `secret` (Block Set) A list of secrets allowed to be used by pods running using this Service Account. More info: https://kubernetes.io/docs/concepts/configuration/secret (see [below for nested schema](#nestedblock--secret)) +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) -The following arguments are supported: +### Read-Only -* `metadata` - (Required) Standard service account's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `image_pull_secret` - (Optional) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `secret` - (Optional) A list of secrets allowed to be used by pods running using this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/secret) -* `automount_service_account_token` - (Optional) Boolean, `true` to enable automatic mounting of the service account token. Defaults to `true`. +- `default_secret_name` (String, Deprecated) +- `id` (String) The ID of this resource. -## Nested Blocks + +### Nested Schema for `metadata` -### `metadata` +Optional: -#### Arguments +- `annotations` (Map of String) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the service account, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the service account must be unique. -* `annotations` - (Optional) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. +Read-Only: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this service account. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) + +### Nested Schema for `image_pull_secret` -* `namespace` - (Optional) Namespace defines the namespace where Terraform will adopt the default service account. +Optional: -#### Attributes +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) -### `image_pull_secret` + +### Nested Schema for `secret` -#### Arguments +Optional: -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `secret` -#### Arguments + +### Nested Schema for `timeouts` -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Optional: -## Attributes Reference +- `create` (String) -In addition to the arguments listed above, the following computed attributes are exported: -* `default_secret_name` - (Deprecated) Name of the default secret, containing service account token, created & managed by the service. By default, the provider will try to find the secret containing the service account token that Kubernetes automatically created for the service account. Where there are multiple tokens and the provider cannot determine which was created by Kubernetes, this attribute will be empty. When only one token is associated with the service account, the provider will return this single token secret. - Starting from version `1.24.0` by default Kubernetes does not automatically generate tokens for service accounts. That leads to the situation when `default_secret_name` cannot be computed and thus will be an empty string. In order to create a service account token, please [use `kubernetes_secret_v1` resource](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret_v1#example-usage-service-account-token) -## Destroying +## Example Usage -If you remove a `kubernetes_default_service_account` resource from your configuration, Terraform will send a delete request to the Kubernetes API. Kubernetes will automatically replace this service account, but any customizations will be lost. If you no longer want to manage a default service account with Terraform, use `terraform state rm` to remove it from state before removing the configuration. +```terraform +resource "kubernetes_default_service_account" "example" { + metadata { + namespace = "terraform-example" + } + secret { + name = "${kubernetes_secret.example.metadata.0.name}" + } +} + +resource "kubernetes_secret" "example" { + metadata { + name = "terraform-example" + } +} +``` ## Import diff --git a/docs/resources/default_service_account_v1.md b/docs/resources/default_service_account_v1.md index dda9349c17..e79bb4d70a 100644 --- a/docs/resources/default_service_account_v1.md +++ b/docs/resources/default_service_account_v1.md @@ -11,79 +11,86 @@ Kubernetes creates a "default" service account in each namespace. This is the se The `kubernetes_default_service_account_v1` resource behaves differently from normal resources. The service account is created by a Kubernetes controller and Terraform "adopts" it into management. This resource should only be used once per namespace. -## Example Usage + +## Schema -```terraform -resource "kubernetes_default_service_account_v1" "example" { - metadata { - namespace = "terraform-example" - } - secret { - name = "${kubernetes_secret_v1.example.metadata.0.name}" - } -} +### Required -resource "kubernetes_secret_v1" "example" { - metadata { - name = "terraform-example" - } -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard service account's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional -## Argument Reference +- `automount_service_account_token` (Boolean) Enable automatic mounting of the service account token +- `image_pull_secret` (Block Set) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--image_pull_secret)) +- `secret` (Block Set) A list of secrets allowed to be used by pods running using this Service Account. More info: https://kubernetes.io/docs/concepts/configuration/secret (see [below for nested schema](#nestedblock--secret)) +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) -The following arguments are supported: +### Read-Only -* `metadata` - (Required) Standard service account's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `image_pull_secret` - (Optional) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `secret` - (Optional) A list of secrets allowed to be used by pods running using this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/secret) -* `automount_service_account_token` - (Optional) Boolean, `true` to enable automatic mounting of the service account token. Defaults to `true`. +- `default_secret_name` (String, Deprecated) +- `id` (String) The ID of this resource. -## Nested Blocks + +### Nested Schema for `metadata` -### `metadata` +Optional: -#### Arguments +- `annotations` (Map of String) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the service account, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the service account must be unique. -* `annotations` - (Optional) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. +Read-Only: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this service account. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) + +### Nested Schema for `image_pull_secret` -* `namespace` - (Optional) Namespace defines the namespace where Terraform will adopt the default service account. +Optional: -#### Attributes +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) -### `image_pull_secret` + +### Nested Schema for `secret` -#### Arguments +Optional: -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `secret` -#### Arguments + +### Nested Schema for `timeouts` -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Optional: -## Attributes Reference +- `create` (String) -In addition to the arguments listed above, the following computed attributes are exported: -* `default_secret_name` - (Deprecated) Name of the default secret, containing service account token, created & managed by the service. By default, the provider will try to find the secret containing the service account token that Kubernetes automatically created for the service account. Where there are multiple tokens and the provider cannot determine which was created by Kubernetes, this attribute will be empty. When only one token is associated with the service account, the provider will return this single token secret. - Starting from version `1.24.0` by default Kubernetes does not automatically generate tokens for service accounts. That leads to the situation when `default_secret_name` cannot be computed and thus will be an empty string. In order to create a service account token, please [use `kubernetes_secret_v1` resource](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret_v1#example-usage-service-account-token) -## Destroying +## Example Usage -If you remove a `kubernetes_default_service_account_v1` resource from your configuration, Terraform will send a delete request to the Kubernetes API. Kubernetes will automatically replace this service account, but any customizations will be lost. If you no longer want to manage a default service account with Terraform, use `terraform state rm` to remove it from state before removing the configuration. +```terraform +resource "kubernetes_default_service_account_v1" "example" { + metadata { + namespace = "terraform-example" + } + secret { + name = "${kubernetes_secret_v1.example.metadata.0.name}" + } +} + +resource "kubernetes_secret_v1" "example" { + metadata { + name = "terraform-example" + } +} +``` ## Import diff --git a/docs/resources/deployment.md b/docs/resources/deployment.md index 5a68aabab2..f6ff5e1905 100644 --- a/docs/resources/deployment.md +++ b/docs/resources/deployment.md @@ -9,899 +9,2317 @@ description: |- A Deployment ensures that a specified number of pod “replicas” are running at any one time. In other words, a Deployment makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Deployment will start more. -## Example Usage + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard deployment's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the specification of the desired behavior of the deployment. More info: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#deployment-v1-apps (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_rollout` (Boolean) Wait for the rollout of the deployment to complete. Defaults to true. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the deployment that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the deployment. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the deployment, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the deployment must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this deployment that can be used by clients to determine when deployment has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this deployment. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `template` (Block List, Min: 1, Max: 1) Template describes the pods that will be created. (see [below for nested schema](#nestedblock--spec--template)) + +Optional: + +- `min_ready_seconds` (Number) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) +- `paused` (Boolean) Indicates that the deployment is paused. +- `progress_deadline_seconds` (Number) The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. +- `replicas` (String) Number of desired pods. This is a string to be able to distinguish between explicit zero and not specified. +- `revision_history_limit` (Number) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. +- `selector` (Block List, Max: 1) A label query over pods that should match the Replicas count. (see [below for nested schema](#nestedblock--spec--selector)) +- `strategy` (Block List, Max: 1) The deployment strategy to use to replace existing pods with new ones. (see [below for nested schema](#nestedblock--spec--strategy)) + + +### Nested Schema for `spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard pod's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--template--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the specification of the desired behavior of the deployment. More info: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#deployment-v1-apps (see [below for nested schema](#nestedblock--spec--template--spec)) + + +### Nested Schema for `spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the pod that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the pod. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the pod, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the pod must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this pod that can be used by clients to determine when pod has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume)) + + +### Nested Schema for `spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: -```terraform -resource "kubernetes_deployment" "example" { - metadata { - name = "terraform-example" - labels = { - test = "MyExampleApp" - } - } +- `service` (String) 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. - spec { - replicas = 3 - selector { - match_labels = { - test = "MyExampleApp" - } - } + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get` - template { - metadata { - labels = { - test = "MyExampleApp" - } - } +Optional: - spec { - container { - image = "nginx:1.21.6" - name = "example" +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. - resources { - limits = { - cpu = "0.5" - memory = "512Mi" - } - requests = { - cpu = "250m" - memory = "50Mi" - } - } + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get.http_header` - liveness_probe { - http_get { - path = "/" - port = 80 +Optional: - http_header { - name = "X-Custom-Header" - value = "Awesome" - } - } +- `name` (String) The header field name +- `value` (String) The header field value - initial_delay_seconds = 3 - period_seconds = 3 - } - } - } - } - } -} -``` -## Argument Reference -The following arguments are supported: + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.tcp_socket` -* `metadata` - (Required) Standard deployment's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the deployment. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the deployment to successfully roll out. Defaults to `true`. +Required: -## Nested Blocks +- `port` (String) 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. -### `metadata` -#### Arguments -* `annotations` - (Optional) An unstructured key value map stored with the deployment that may be used to store arbitrary metadata. + +### Nested Schema for `spec.template.spec.init_container.port` -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +Required: -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the deployment. +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). **Must match `selector`**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +Optional: -* `name` - (Optional) Name of the deployment, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the deployment must be unique. +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". -#### Attributes -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this deployment that can be used by clients to determine when deployment has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this deployment. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) + +### Nested Schema for `spec.template.spec.init_container.readiness_probe` -### `spec` +Optional: -#### Arguments +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `paused` - (Optional) Indicates that the deployment is paused. -* `progress_deadline_seconds` - (Optional) The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. -* `replicas` - (Optional) The number of desired replicas. This attribute is a string to be able to distinguish between explicit zero and not specified. Defaults to 1. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#scaling-a-deployment) -* `revision_history_limit` - (Optional) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. -* `strategy` - (Optional) The deployment strategy to use to replace existing pods with new ones. -* `selector` - (Optional) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this deployment. **Must match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) -* `template` - (Required) Describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#pod-template) + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.exec` -### `strategy` +Optional: -#### Arguments +- `command` (List of String) 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. 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. -* `type` - Type of deployment. Can be 'Recreate' or 'RollingUpdate'. Default is RollingUpdate. -* `rolling_update` - Rolling update config params. Present only if type = RollingUpdate. -### `rolling_update` + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.grpc` -#### Arguments +Required: -* `max_surge` - The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. -* `max_unavailable` - The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. -### `template` +Optional: -#### Arguments +- `service` (String) 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. -* `metadata` - (Required) Standard object's metadata. For more info see https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata. -* `spec` - (Required) Specification of the desired behavior of the pod. For more info see https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. -### template `spec` + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get` -#### Arguments +Optional: -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true`. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `readiness_gate` - (Optional) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True". [More info](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-readiness-gate) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `scheduler_name` - (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. -### `affinity` + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get.http_header` -#### Arguments +Optional: -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) +- `name` (String) The header field name +- `value` (String) The header field value -### `node_affinity` -#### Arguments -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.tcp_socket` -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +Required: -### `required_during_scheduling_ignored_during_execution` +- `port` (String) 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. -#### Arguments -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. -## `node_selector_term` + +### Nested Schema for `spec.template.spec.init_container.resources` -#### Arguments +Optional: -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -* `match_fields` - (Optional) A list of node selector requirements by node's fields. -### `match_expressions` / `match_fields` + +### Nested Schema for `spec.template.spec.init_container.security_context` -#### Arguments +Optional: -* `key` - (Required) The label key that the selector applies to. +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--seccomp_profile)) -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + +### Nested Schema for `spec.template.spec.init_container.security_context.capabilities` -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. +Optional: -### `preferred_during_scheduling_ignored_during_execution` +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities -#### Arguments -* `preference` - (Required) A node selector term, associated with the corresponding weight. + +### Nested Schema for `spec.template.spec.init_container.security_context.se_linux_options` -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. +Optional: -### `preference` +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. -#### Arguments -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. + +### Nested Schema for `spec.template.spec.init_container.security_context.seccomp_profile` -* `match_fields` - (Optional) A list of node selector requirements by node's fields. +Optional: -## `match_expressions` / `match_fields` +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. -#### Arguments -* `key` - (Required) The label key that the selector applies to. -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + +### Nested Schema for `spec.template.spec.init_container.startup_probe` -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. +Optional: -### `pod_affinity` +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.startup_probe.exec` -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. +Optional: -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +- `command` (List of String) 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. 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. -### `pod_anti_affinity` -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.startup_probe.grpc` -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. +Required: -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) +Optional: -#### Arguments +- `service` (String) 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. -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Optional) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. -### `preferred_during_scheduling_ignored_during_execution` + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get` -#### Arguments +Optional: -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. -### `container` + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get.http_header` -#### Arguments +Optional: -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. +- `name` (String) The header field name +- `value` (String) The header field value -### `readiness_gate` -#### Arguments -* `condition_type` - (Required) refers to a condition in the pod's condition list with matching type. + +### Nested Schema for `spec.template.spec.init_container.startup_probe.tcp_socket` -### `aws_elastic_block_store` +Required: -#### Arguments +- `port` (String) 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. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -### `azure_disk` -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.volume_mount` -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +Required: -### `azure_file` +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. -#### Arguments +Optional: -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -### `capabilities` -#### Arguments -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities + +### Nested Schema for `spec.template.spec.os` -### `ceph_fs` +Required: -#### Arguments +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -### `cinder` + +### Nested Schema for `spec.template.spec.readiness_gate` -#### Arguments +Required: -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. -### `config_map` -#### Arguments + +### Nested Schema for `spec.template.spec.security_context` -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Optional: -### `config_map_ref` +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--windows_options)) -#### Arguments + +### Nested Schema for `spec.template.spec.security_context.se_linux_options` -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined +Optional: -### `config_map_key_ref` +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. -#### Arguments -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap or its key must be defined + +### Nested Schema for `spec.template.spec.security_context.seccomp_profile` -### `csi` +Optional: -#### Arguments +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. -- `driver` - (Required) the name of the volume driver to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -- `volume_attributes` - (Optional) Attributes of the volume to publish. -- `fs_type` - (Optional) Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. `ext4`, `xfs`, `ntfs`. -- `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to `true`. If omitted, the default is `false`. -- `node_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -### `dns_config` + +### Nested Schema for `spec.template.spec.security_context.sysctl` -#### Arguments +Required: -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. -The `option` block supports the following: -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. + +### Nested Schema for `spec.template.spec.security_context.windows_options` -### `downward_api` +Optional: -#### Arguments +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. -### `empty_dir` -#### Arguments + +### Nested Schema for `spec.template.spec.toleration` -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). +Optional: -### `env` +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. -#### Arguments -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value + +### Nested Schema for `spec.template.spec.topology_spread_constraint` -### `env_from` +Optional: -#### Arguments +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector` -### `exec` +Optional: -#### Arguments +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. -* `command` - (Optional) 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. 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. + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector.match_expressions` -### `fc` +Optional: -#### Arguments +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) -### `field_ref` -#### Arguments -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version + +### Nested Schema for `spec.template.spec.volume` -### `flex_volume` +Optional: -#### Arguments +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--vsphere_volume)) -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. + +### Nested Schema for `spec.template.spec.volume.aws_elastic_block_store` -### `flocker` +Required: -#### Arguments +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset +Optional: -### `gce_persistent_disk` +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore -#### Arguments -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) + +### Nested Schema for `spec.template.spec.volume.azure_disk` -### `git_repo` +Required: -#### Arguments +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. +Optional: -### `glusterfs` +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -#### Arguments -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. + +### Nested Schema for `spec.template.spec.volume.azure_file` -### `grpc` +Required: -#### Arguments +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. +Optional: -### `host_aliases` +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. -#### Arguments -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. + +### Nested Schema for `spec.template.spec.volume.ceph_fs` -### `host_path` +Required: -#### Arguments +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) +Optional: -### `http_get` +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -#### Arguments + +### Nested Schema for `spec.template.spec.volume.ceph_fs.secret_ref` -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. +Optional: -### `http_header` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value -### `image_pull_secrets` + +### Nested Schema for `spec.template.spec.volume.cinder` -#### Arguments +Required: -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md -### `iscsi` +Optional: -#### Arguments +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). -### `items` + +### Nested Schema for `spec.template.spec.volume.config_map` -#### Arguments +Optional: -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. -### `lifecycle` + +### Nested Schema for `spec.template.spec.volume.config_map.items` -#### Arguments +Optional: -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -### `liveness_probe` -#### Arguments -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) + +### Nested Schema for `spec.template.spec.volume.csi` -### `nfs` +Required: -#### Arguments +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) +Optional: -### `persistent_volume_claim` +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. -#### Arguments + +### Nested Schema for `spec.template.spec.volume.csi.node_publish_secret_ref` -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. +Optional: -### `photon_persistent_disk` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk -### `port` + +### Nested Schema for `spec.template.spec.volume.downward_api` -#### Arguments +Optional: -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items)) -### `post_start` + +### Nested Schema for `spec.template.spec.volume.downward_api.items` -#### Arguments +Required: -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' -### `pre_stop` +Optional: -#### Arguments +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--resource_field_ref)) -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported + +### Nested Schema for `spec.template.spec.volume.downward_api.items.field_ref` -### `quobyte` +Optional: -#### Arguments +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. -### `rbd` + +### Nested Schema for `spec.template.spec.volume.downward_api.items.resource_field_ref` -#### Arguments +Required: -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. +- `container_name` (String) +- `resource` (String) Resource to select -### `readiness_probe` +Optional: -#### Arguments +- `divisor` (String) -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -### `resources` -#### Arguments -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. + +### Nested Schema for `spec.template.spec.volume.empty_dir` -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. +Optional: -Please, look at the example below: +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice -```terraform -resources { - limits = {} - requests = {} -} -``` -### `resource_field_ref` + +### Nested Schema for `spec.template.spec.volume.iscsi` -#### Arguments +Required: -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). -### `seccomp_profile` +Optional: -#### Attributes +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. -### `se_linux_options` + +### Nested Schema for `spec.template.spec.volume.local` -#### Arguments +Optional: -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local -### `secret` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.nfs` -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) +Required: -The `items` block supports the following: +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. +Optional: -### `secret_ref` +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -#### Arguments -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined + +### Nested Schema for `spec.template.spec.volume.persistent_volume_claim` -### `secret_key_ref` +Optional: -#### Arguments +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined -### `secret_ref` + +### Nested Schema for `spec.template.spec.volume.photon_persistent_disk` -#### Arguments +Required: -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `pd_id` (String) ID that identifies Photon Controller persistent disk -### container `security_context` +Optional: -#### Arguments +- `fs_type` (String) 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. -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `fs_group_change_policy` - 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. -### `capabilities` + +### Nested Schema for `spec.template.spec.volume.projected` -#### Arguments +Required: -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources)) -### pod `security_context` +Optional: -#### Arguments +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `fs_group` - (Optional) 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. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. + +### Nested Schema for `spec.template.spec.volume.projected.sources` -##### Sysctl +Optional: -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--service_account_token)) -### `tcp_socket` + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map` -#### Arguments +Optional: -* `port` - (Required) 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. -### `value_from` + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map.items` -#### Arguments +Optional: -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -### `toleration` -#### Arguments -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api` -### `projected` +Optional: -#### Arguments +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items)) -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items` -### `sources` +Required: -#### Arguments +- `path` (String) 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 '..' -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). +Optional: -### `service_account_token` +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.field_ref` -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. +Optional: -### `volume` +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version -#### Arguments -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `csi` - (Optional) CSI represents storage that is handled by an external CSI driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi) -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` -### `volume_mount` +Required: -#### Arguments +- `container_name` (String) +- `resource` (String) Resource to select -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) +Optional: -### `vsphere_volume` +- `divisor` (String) -#### Arguments -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk -### `ephemeral` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret` -* `volume_claim_template` - (Required) 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. +Optional: -### `volume_claim_template` +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret.items` -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. +Optional: -## Timeouts +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_deployment` resource: -* `create` - (Default `10 minutes`) Used for creating new controller -* `update` - (Default `10 minutes`) Used for updating a controller -* `delete` - (Default `10 minutes`) Used for destroying a controller + + +### Nested Schema for `spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.strategy` + +Optional: + +- `rolling_update` (Block List, Max: 1) Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. (see [below for nested schema](#nestedblock--spec--strategy--rolling_update)) +- `type` (String) Type of deployment. Can be 'Recreate' or 'RollingUpdate'. Default is RollingUpdate. + + +### Nested Schema for `spec.strategy.rolling_update` + +Optional: + +- `max_surge` (String) The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. +- `max_unavailable` (String) The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `update` (String) + + + + +## Example Usage + +```terraform +resource "kubernetes_deployment" "example" { + metadata { + name = "terraform-example" + labels = { + test = "MyExampleApp" + } + } + + spec { + replicas = 3 + + selector { + match_labels = { + test = "MyExampleApp" + } + } + + template { + metadata { + labels = { + test = "MyExampleApp" + } + } + + spec { + container { + image = "nginx:1.21.6" + name = "example" + + resources { + limits = { + cpu = "0.5" + memory = "512Mi" + } + requests = { + cpu = "250m" + memory = "50Mi" + } + } + + liveness_probe { + http_get { + path = "/" + port = 80 + + http_header { + name = "X-Custom-Header" + value = "Awesome" + } + } + + initial_delay_seconds = 3 + period_seconds = 3 + } + } + } + } + } +} +``` ## Import diff --git a/docs/resources/deployment_v1.md b/docs/resources/deployment_v1.md index 64b25bc8ba..fbff60a8ef 100644 --- a/docs/resources/deployment_v1.md +++ b/docs/resources/deployment_v1.md @@ -9,887 +9,2317 @@ description: |- A Deployment ensures that a specified number of pod “replicas” are running at any one time. In other words, a Deployment makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Deployment will start more. -## Example Usage + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard deployment's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the specification of the desired behavior of the deployment. More info: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#deployment-v1-apps (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_rollout` (Boolean) Wait for the rollout of the deployment to complete. Defaults to true. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the deployment that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the deployment. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the deployment, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the deployment must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this deployment that can be used by clients to determine when deployment has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this deployment. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `template` (Block List, Min: 1, Max: 1) Template describes the pods that will be created. (see [below for nested schema](#nestedblock--spec--template)) + +Optional: + +- `min_ready_seconds` (Number) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) +- `paused` (Boolean) Indicates that the deployment is paused. +- `progress_deadline_seconds` (Number) The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. +- `replicas` (String) Number of desired pods. This is a string to be able to distinguish between explicit zero and not specified. +- `revision_history_limit` (Number) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. +- `selector` (Block List, Max: 1) A label query over pods that should match the Replicas count. (see [below for nested schema](#nestedblock--spec--selector)) +- `strategy` (Block List, Max: 1) The deployment strategy to use to replace existing pods with new ones. (see [below for nested schema](#nestedblock--spec--strategy)) + + +### Nested Schema for `spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard pod's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--template--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the specification of the desired behavior of the deployment. More info: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#deployment-v1-apps (see [below for nested schema](#nestedblock--spec--template--spec)) + + +### Nested Schema for `spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the pod that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the pod. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the pod, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the pod must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this pod that can be used by clients to determine when pod has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume)) + + +### Nested Schema for `spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get` -```terraform -resource "kubernetes_deployment_v1" "example" { - metadata { - name = "terraform-example" - labels = { - test = "MyExampleApp" - } - } +Optional: - spec { - replicas = 3 +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. - selector { - match_labels = { - test = "MyExampleApp" - } - } + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get.http_header` - template { - metadata { - labels = { - test = "MyExampleApp" - } - } +Optional: - spec { - container { - image = "nginx:1.21.6" - name = "example" +- `name` (String) The header field name +- `value` (String) The header field value - resources { - limits = { - cpu = "0.5" - memory = "512Mi" - } - requests = { - cpu = "250m" - memory = "50Mi" - } - } - liveness_probe { - http_get { - path = "/" - port = 80 - http_header { - name = "X-Custom-Header" - value = "Awesome" - } - } + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.tcp_socket` - initial_delay_seconds = 3 - period_seconds = 3 - } - } - } - } - } -} -``` +Required: -## Argument Reference +- `port` (String) 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. -The following arguments are supported: -* `metadata` - (Required) Standard deployment's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the deployment. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the deployment to successfully roll out. Defaults to `true`. -## Nested Blocks + +### Nested Schema for `spec.template.spec.init_container.port` -### `metadata` +Required: -#### Arguments +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `annotations` - (Optional) An unstructured key value map stored with the deployment that may be used to store arbitrary metadata. +Optional: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the deployment. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). **Must match `selector`**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) + +### Nested Schema for `spec.template.spec.init_container.readiness_probe` -* `name` - (Optional) Name of the deployment, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the deployment must be unique. +Optional: -#### Attributes +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this deployment that can be used by clients to determine when deployment has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this deployment. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.exec` -### `spec` +Optional: -#### Arguments +- `command` (List of String) 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. 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. -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `paused` - (Optional) Indicates that the deployment is paused. -* `progress_deadline_seconds` - (Optional) The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. -* `replicas` - (Optional) The number of desired replicas. This attribute is a string to be able to distinguish between explicit zero and not specified. Defaults to 1. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#scaling-a-deployment) -* `revision_history_limit` - (Optional) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. -* `strategy` - (Optional) The deployment strategy to use to replace existing pods with new ones. -* `selector` - (Optional) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this deployment. **Must match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) -* `template` - (Required) Describes the pod that will be created if insufficient replicas are detected. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#pod-template) -### `strategy` + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.grpc` -#### Arguments +Required: -* `type` - Type of deployment. Can be 'Recreate' or 'RollingUpdate'. Default is RollingUpdate. -* `rolling_update` - Rolling update config params. Present only if type = RollingUpdate. +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. -### `rolling_update` +Optional: -#### Arguments +- `service` (String) 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. -* `max_surge` - The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. -* `max_unavailable` - The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. -### `template` + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get` -#### Arguments +Optional: -* `metadata` - (Required) Standard object's metadata. For more info see https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata. -* `spec` - (Required) Specification of the desired behavior of the pod. For more info see https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. -### template `spec` + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get.http_header` -#### Arguments +Optional: -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true`. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `readiness_gate` - (Optional) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True". [More info](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-readiness-gate) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `scheduler_name` - (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) +- `name` (String) The header field name +- `value` (String) The header field value -### `affinity` -#### Arguments -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.tcp_socket` -### `node_affinity` +Required: -#### Arguments +- `port` (String) 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. -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. -### `required_during_scheduling_ignored_during_execution` + +### Nested Schema for `spec.template.spec.init_container.resources` -#### Arguments +Optional: -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -## `node_selector_term` -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.security_context` -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. +Optional: -* `match_fields` - (Optional) A list of node selector requirements by node's fields. +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--seccomp_profile)) -### `match_expressions` / `match_fields` + +### Nested Schema for `spec.template.spec.init_container.security_context.capabilities` -#### Arguments +Optional: -* `key` - (Required) The label key that the selector applies to. +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. + +### Nested Schema for `spec.template.spec.init_container.security_context.se_linux_options` -### `preferred_during_scheduling_ignored_during_execution` +Optional: -#### Arguments +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. -* `preference` - (Required) A node selector term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + +### Nested Schema for `spec.template.spec.init_container.security_context.seccomp_profile` -### `preference` +Optional: -#### Arguments +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. -* `match_fields` - (Optional) A list of node selector requirements by node's fields. -## `match_expressions` / `match_fields` + +### Nested Schema for `spec.template.spec.init_container.startup_probe` -#### Arguments +Optional: -* `key` - (Required) The label key that the selector applies to. +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + +### Nested Schema for `spec.template.spec.init_container.startup_probe.exec` -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. +Optional: -### `pod_affinity` +- `command` (List of String) 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. 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. -#### Arguments -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. + +### Nested Schema for `spec.template.spec.init_container.startup_probe.grpc` -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +Required: -### `pod_anti_affinity` +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. -#### Arguments +Optional: -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. +- `service` (String) 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. -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get` -#### Arguments +Optional: -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Optional) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. -### `preferred_during_scheduling_ignored_during_execution` + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get.http_header` -#### Arguments +Optional: -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. +- `name` (String) The header field name +- `value` (String) The header field value -### `container` -#### Arguments -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + +### Nested Schema for `spec.template.spec.init_container.startup_probe.tcp_socket` -### `readiness_gate` +Required: -#### Arguments +- `port` (String) 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. -* `condition_type` - (Required) refers to a condition in the pod's condition list with matching type. -### `aws_elastic_block_store` -#### Arguments + +### Nested Schema for `spec.template.spec.init_container.volume_mount` -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) +Required: -### `azure_disk` +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. -#### Arguments +Optional: -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -### `azure_file` -#### Arguments -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name + +### Nested Schema for `spec.template.spec.os` -### `capabilities` +Required: -#### Arguments +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities -### `ceph_fs` + +### Nested Schema for `spec.template.spec.readiness_gate` -#### Arguments +Required: -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. -### `cinder` -#### Arguments + +### Nested Schema for `spec.template.spec.security_context` -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. +Optional: -### `config_map` +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--windows_options)) -#### Arguments + +### Nested Schema for `spec.template.spec.security_context.se_linux_options` -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Optional: -### `config_map_ref` +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. -#### Arguments -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined + +### Nested Schema for `spec.template.spec.security_context.seccomp_profile` -### `config_map_key_ref` +Optional: -#### Arguments +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap or its key must be defined -### `dns_config` + +### Nested Schema for `spec.template.spec.security_context.sysctl` -#### Arguments +Required: -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. -The `option` block supports the following: -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. + +### Nested Schema for `spec.template.spec.security_context.windows_options` -### `downward_api` +Optional: -#### Arguments +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. -### `empty_dir` -#### Arguments + +### Nested Schema for `spec.template.spec.toleration` -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). +Optional: -### `env` +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. -#### Arguments -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value + +### Nested Schema for `spec.template.spec.topology_spread_constraint` -### `env_from` +Optional: -#### Arguments +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector` -### `exec` +Optional: -#### Arguments +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. -* `command` - (Optional) 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. 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. + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector.match_expressions` -### `fc` +Optional: -#### Arguments +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) -### `field_ref` -#### Arguments -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version + +### Nested Schema for `spec.template.spec.volume` -### `flex_volume` +Optional: -#### Arguments +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--vsphere_volume)) -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. + +### Nested Schema for `spec.template.spec.volume.aws_elastic_block_store` -### `flocker` +Required: -#### Arguments +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset +Optional: -### `gce_persistent_disk` +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore -#### Arguments -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) + +### Nested Schema for `spec.template.spec.volume.azure_disk` -### `git_repo` +Required: -#### Arguments +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. +Optional: -### `glusterfs` +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -#### Arguments -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. + +### Nested Schema for `spec.template.spec.volume.azure_file` -### `grpc` +Required: -#### Arguments +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. +Optional: -### `host_aliases` +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. -#### Arguments -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. + +### Nested Schema for `spec.template.spec.volume.ceph_fs` -### `host_path` +Required: -#### Arguments +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) +Optional: -### `http_get` +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -#### Arguments + +### Nested Schema for `spec.template.spec.volume.ceph_fs.secret_ref` -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. +Optional: -### `http_header` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value -### `image_pull_secrets` + +### Nested Schema for `spec.template.spec.volume.cinder` -#### Arguments +Required: -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md -### `iscsi` +Optional: -#### Arguments +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). -### `items` + +### Nested Schema for `spec.template.spec.volume.config_map` -#### Arguments +Optional: -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. -### `lifecycle` + +### Nested Schema for `spec.template.spec.volume.config_map.items` -#### Arguments +Optional: -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -### `liveness_probe` -#### Arguments -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) + +### Nested Schema for `spec.template.spec.volume.csi` -### `nfs` +Required: -#### Arguments +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) +Optional: -### `persistent_volume_claim` +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. -#### Arguments + +### Nested Schema for `spec.template.spec.volume.csi.node_publish_secret_ref` -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. +Optional: -### `photon_persistent_disk` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk -### `port` + +### Nested Schema for `spec.template.spec.volume.downward_api` -#### Arguments +Optional: -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items)) -### `post_start` + +### Nested Schema for `spec.template.spec.volume.downward_api.items` -#### Arguments +Required: -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' -### `pre_stop` +Optional: -#### Arguments +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--resource_field_ref)) -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported + +### Nested Schema for `spec.template.spec.volume.downward_api.items.field_ref` -### `quobyte` +Optional: -#### Arguments +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. -### `rbd` + +### Nested Schema for `spec.template.spec.volume.downward_api.items.resource_field_ref` -#### Arguments +Required: -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. +- `container_name` (String) +- `resource` (String) Resource to select -### `readiness_probe` +Optional: -#### Arguments +- `divisor` (String) -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -### `resources` -#### Arguments -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. + +### Nested Schema for `spec.template.spec.volume.empty_dir` -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. +Optional: -Please, look at the example below: +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice -```terraform -resources { - limits = {} - requests = {} -} -``` -### `resource_field_ref` + +### Nested Schema for `spec.template.spec.volume.iscsi` -#### Arguments +Required: -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). -### `seccomp_profile` +Optional: -#### Attributes +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. -### `se_linux_options` + +### Nested Schema for `spec.template.spec.volume.local` -#### Arguments +Optional: -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local -### `secret` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.nfs` -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) +Required: -The `items` block supports the following: +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. +Optional: -### `secret_ref` +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -#### Arguments -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined + +### Nested Schema for `spec.template.spec.volume.persistent_volume_claim` -### `secret_key_ref` +Optional: -#### Arguments +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined -### `secret_ref` + +### Nested Schema for `spec.template.spec.volume.photon_persistent_disk` -#### Arguments +Required: -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `pd_id` (String) ID that identifies Photon Controller persistent disk -### container `security_context` +Optional: -#### Arguments +- `fs_type` (String) 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. -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -### `capabilities` + +### Nested Schema for `spec.template.spec.volume.projected` -#### Arguments +Required: -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources)) -### pod `security_context` +Optional: -#### Arguments +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `fs_group` - (Optional) 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. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. + +### Nested Schema for `spec.template.spec.volume.projected.sources` -##### Sysctl +Optional: -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--service_account_token)) -### `tcp_socket` + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map` -#### Arguments +Optional: -* `port` - (Required) 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. -### `value_from` + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map.items` -#### Arguments +Optional: -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -### `toleration` -#### Arguments -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api` -### `projected` +Optional: -#### Arguments +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items)) -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items` -### `sources` +Required: -#### Arguments +- `path` (String) 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 '..' -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). +Optional: -### `service_account_token` +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.field_ref` -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. +Optional: -### `volume` +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version -#### Arguments -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` -### `volume_mount` +Required: -#### Arguments +- `container_name` (String) +- `resource` (String) Resource to select -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) +Optional: -### `vsphere_volume` +- `divisor` (String) -#### Arguments -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk -### `ephemeral` -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret` -* `volume_claim_template` - (Required) 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. +Optional: -### `volume_claim_template` +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. -#### Arguments + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret.items` -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. +Optional: -## Timeouts +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_deployment_v1` resource: -* `create` - (Default `10 minutes`) Used for creating new controller -* `update` - (Default `10 minutes`) Used for updating a controller -* `delete` - (Default `10 minutes`) Used for destroying a controller + + +### Nested Schema for `spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.strategy` + +Optional: + +- `rolling_update` (Block List, Max: 1) Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. (see [below for nested schema](#nestedblock--spec--strategy--rolling_update)) +- `type` (String) Type of deployment. Can be 'Recreate' or 'RollingUpdate'. Default is RollingUpdate. + + +### Nested Schema for `spec.strategy.rolling_update` + +Optional: + +- `max_surge` (String) The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. +- `max_unavailable` (String) The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `update` (String) + + + + +## Example Usage + +```terraform +resource "kubernetes_deployment_v1" "example" { + metadata { + name = "terraform-example" + labels = { + test = "MyExampleApp" + } + } + + spec { + replicas = 3 + + selector { + match_labels = { + test = "MyExampleApp" + } + } + + template { + metadata { + labels = { + test = "MyExampleApp" + } + } + + spec { + container { + image = "nginx:1.21.6" + name = "example" + + resources { + limits = { + cpu = "0.5" + memory = "512Mi" + } + requests = { + cpu = "250m" + memory = "50Mi" + } + } + + liveness_probe { + http_get { + path = "/" + port = 80 + + http_header { + name = "X-Custom-Header" + value = "Awesome" + } + } + + initial_delay_seconds = 3 + period_seconds = 3 + } + } + } + } + } +} +``` ## Import diff --git a/docs/resources/endpoint_slice_v1.md b/docs/resources/endpoint_slice_v1.md index ef140ee5f8..06fa1b5d42 100644 --- a/docs/resources/endpoint_slice_v1.md +++ b/docs/resources/endpoint_slice_v1.md @@ -5,100 +5,120 @@ description: |- An EndpointSlice contains references to a set of network endpoints. --- -# kubernetes_endpoints_slice_v1 +# kubernetes_endpoint_slice_v1 An EndpointSlice contains references to a set of network endpoints. -## Example Usage + +## Schema -```terraform -resource "kubernetes_endpoint_slice_v1" "test" { - metadata { - name = "test" - } +### Required - endpoint { - condition { - ready = true - } - addresses = ["129.144.50.56"] - } +- `address_type` (String) address_type specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. +- `endpoint` (Block List, Min: 1, Max: 1000) endpoint is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. (see [below for nested schema](#nestedblock--endpoint)) +- `metadata` (Block List, Min: 1, Max: 1) Standard endpoint_slice's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `port` (Block List, Min: 1, Max: 100) port specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. Each slice may include a maximum of 100 ports. (see [below for nested schema](#nestedblock--port)) - port { - port = "9000" - name = "first" - } +### Read-Only - address_type = "IPv4" -} -``` +- `id` (String) The ID of this resource. + + +### Nested Schema for `endpoint` + +Required: + +- `addresses` (List of String) addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. + +Optional: + +- `condition` (Block List, Max: 1) condition contains information about the current status of the endpoint. (see [below for nested schema](#nestedblock--endpoint--condition)) +- `hostname` (String) hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other. +- `node_name` (String) nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. +- `target_ref` (Block List, Max: 1) targetRef is a reference to a Kubernetes object that represents this endpoint. (see [below for nested schema](#nestedblock--endpoint--target_ref)) +- `zone` (String) zone is the name of the Zone this endpoint exists in. + + +### Nested Schema for `endpoint.condition` -## Argument Reference +Optional: -The following arguments are supported: +- `ready` (Boolean) ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. +- `serving` (Boolean) serving is identical to ready except that it is set regardless of the terminating state of endpoints. +- `terminating` (Boolean) terminating indicates that this endpoint is terminating. -* `metadata` - (Required) Standard endpoints' metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `address_type` - (Required) Specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: *IPv4: Represents an IPv4 Address.* IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. -* `endpoint` - (Required) A list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. -* `port` - (Required) Specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. -## Nested Blocks + +### Nested Schema for `endpoint.target_ref` -### `metadata` +Required: -#### Arguments +- `name` (String) Name of the referent. -* `annotations` - (Optional) An unstructured key value map stored with the endpoints resource that may be used to store arbitrary metadata. +Optional: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `field_path` (String) If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. +- `namespace` (String) Namespace of the referent. +- `resource_version` (String) Specific resourceVersion to which this reference is made, if any. +- `uid` (String) If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the endpoints resource. May match selectors of replication controllers and services. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) -* `name` - (Optional) Name of the endpoints resource, must be unique. Cannot be updated. This name should correspond with an accompanying Service resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the endpoints resource must be unique. + +### Nested Schema for `metadata` -#### Attributes +Optional: -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this endpoints resource that can be used by clients to determine when endpoints resource has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this endpoints resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +- `annotations` (Map of String) An unstructured key value map stored with the endpoint_slice that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the endpoint_slice. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the endpoint_slice, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the endpoint_slice must be unique. -### `endpoint` +Read-Only: -#### Arguments +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this endpoint_slice that can be used by clients to determine when endpoint_slice has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this endpoint_slice. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `addresses` - (Required) addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. -* `condition` - (Optional) Contains information about the current status of the endpoint. -* `hostname` - (Optional) hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. -* `node_name` - (Optional) Represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. -* `target_ref` - (Optional) targetRef is a reference to a Kubernetes object that represents this endpoint. -* `zone` - (Optional) The name of the Zone this endpoint exists in. -### `condition` + +### Nested Schema for `port` -#### Attributes +Required: -* `ready` - (Optional) Indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. -* `serving` - (Optional) Serving is identical to ready except that it is set regardless of the terminating state of endpoints. -* `terminating` - (Optional) Indicates that this endpoint is terminating. +- `app_protocol` (String) The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. +- `port` (String) port represents the port number of the endpoint. -### `target_ref` +Optional: -#### Attributes +- `name` (String) name represents the name of this port. All ports in an EndpointSlice must have a unique name. +- `protocol` (String) protocol represents the IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. -* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). -* `hostname` - (Optional) The Hostname of this endpoint. -* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node. -* `zone` - (Optional) The name of the zone this endpoint exists in. -### `port` -#### Arguments -* `name` - (Optional) The name of this port within the endpoint. All ports within the endpoint must have unique names. Optional if only one port is defined on this endpoint. -* `port` - (Required) The port that will be utilized by this endpoint. -* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. -* `app_protocol` - (Optional) The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. +## Example Usage + +```terraform +resource "kubernetes_endpoint_slice_v1" "test" { + metadata { + name = "test" + } + + endpoint { + condition { + ready = true + } + addresses = ["129.144.50.56"] + } + + port { + port = "9000" + name = "first" + } + + address_type = "IPv4" +} +``` + diff --git a/docs/resources/endpoints.md b/docs/resources/endpoints.md index b75a09bc11..2e293d9034 100644 --- a/docs/resources/endpoints.md +++ b/docs/resources/endpoints.md @@ -5,10 +5,94 @@ description: |- An Endpoints resource is an abstraction, linked to a Service, which defines the list of endpoints that actually implement the service. --- -# kubernetes_endpoints +# kubernetes_endpoints An Endpoints resource is an abstraction, linked to a Service, which defines the list of endpoints that actually implement the service. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard endpoints's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `subset` (Block Set) Set of addresses and ports that comprise a service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#services-without-selectors (see [below for nested schema](#nestedblock--subset)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the endpoints that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the endpoints. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the endpoints, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the endpoints must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this endpoints that can be used by clients to determine when endpoints has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this endpoints. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `subset` + +Optional: + +- `address` (Block Set) IP address which offers the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize. (see [below for nested schema](#nestedblock--subset--address)) +- `not_ready_address` (Block Set) IP address which offers the related ports but is not currently marked as ready because it have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. (see [below for nested schema](#nestedblock--subset--not_ready_address)) +- `port` (Block Set) Port number available on the related IP addresses. (see [below for nested schema](#nestedblock--subset--port)) + + +### Nested Schema for `subset.address` + +Required: + +- `ip` (String) The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). + +Optional: + +- `hostname` (String) The Hostname of this endpoint. +- `node_name` (String) Node hosting this endpoint. This can be used to determine endpoints local to a node. + + + +### Nested Schema for `subset.not_ready_address` + +Required: + +- `ip` (String) The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). + +Optional: + +- `hostname` (String) The Hostname of this endpoint. +- `node_name` (String) Node hosting this endpoint. This can be used to determine endpoints local to a node. + + + +### Nested Schema for `subset.port` + +Required: + +- `port` (Number) The port that will be exposed by this endpoint. + +Optional: + +- `name` (String) The name of this port within the endpoint. Must be a DNS_LABEL. Optional if only one Port is defined on this endpoint. +- `protocol` (String) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. + + + + + ## Example Usage ```terraform @@ -81,69 +165,6 @@ resource "kubernetes_service" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard endpoints' metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `subset` - (Optional) Set of addresses and ports that comprise a service. Can be repeated multiple times. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the endpoints resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the endpoints resource. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the endpoints resource, must be unique. Cannot be updated. This name should correspond with an accompanying Service resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the endpoints resource must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this endpoints resource that can be used by clients to determine when endpoints resource has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this endpoints resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `subset` - -#### Arguments - -* `address` - (Optional) An IP address block which offers the related ports and is ready to accept traffic. These endpoints should be considered safe for load balancers and clients to utilize. Can be repeated multiple times. -* `not_ready_address` - (Optional) A IP address block which offers the related ports but is not currently marked as ready because it have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. Can be repeated multiple times. -* `port` - (Optional) A port number block available on the related IP addresses. Can be repeated multiple times. - -### `address` - -#### Attributes - -* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). -* `hostname` - (Optional) The Hostname of this endpoint. -* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node. - -### `not_ready_address` - -#### Attributes - -* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). -* `hostname` - (Optional) The Hostname of this endpoint. -* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node. - -### `port` - -#### Arguments - -* `name` - (Optional) The name of this port within the endpoint. All ports within the endpoint must have unique names. Optional if only one port is defined on this endpoint. -* `port` - (Required) The port that will be utilized by this endpoint. -* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. - ## Import An Endpoints resource can be imported using its namespace and name, e.g. diff --git a/docs/resources/endpoints_v1.md b/docs/resources/endpoints_v1.md index f627bb222e..43609ddb62 100644 --- a/docs/resources/endpoints_v1.md +++ b/docs/resources/endpoints_v1.md @@ -9,6 +9,90 @@ description: |- An Endpoints resource is an abstraction, linked to a Service, which defines the list of endpoints that actually implement the service. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard endpoints's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `subset` (Block Set) Set of addresses and ports that comprise a service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#services-without-selectors (see [below for nested schema](#nestedblock--subset)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the endpoints that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the endpoints. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the endpoints, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the endpoints must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this endpoints that can be used by clients to determine when endpoints has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this endpoints. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `subset` + +Optional: + +- `address` (Block Set) IP address which offers the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize. (see [below for nested schema](#nestedblock--subset--address)) +- `not_ready_address` (Block Set) IP address which offers the related ports but is not currently marked as ready because it have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. (see [below for nested schema](#nestedblock--subset--not_ready_address)) +- `port` (Block Set) Port number available on the related IP addresses. (see [below for nested schema](#nestedblock--subset--port)) + + +### Nested Schema for `subset.address` + +Required: + +- `ip` (String) The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). + +Optional: + +- `hostname` (String) The Hostname of this endpoint. +- `node_name` (String) Node hosting this endpoint. This can be used to determine endpoints local to a node. + + + +### Nested Schema for `subset.not_ready_address` + +Required: + +- `ip` (String) The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). + +Optional: + +- `hostname` (String) The Hostname of this endpoint. +- `node_name` (String) Node hosting this endpoint. This can be used to determine endpoints local to a node. + + + +### Nested Schema for `subset.port` + +Required: + +- `port` (Number) The port that will be exposed by this endpoint. + +Optional: + +- `name` (String) The name of this port within the endpoint. Must be a DNS_LABEL. Optional if only one Port is defined on this endpoint. +- `protocol` (String) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. + + + + + ## Example Usage ```terraform @@ -81,69 +165,6 @@ resource "kubernetes_service_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard endpoints' metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `subset` - (Optional) Set of addresses and ports that comprise a service. Can be repeated multiple times. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the endpoints resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the endpoints resource. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the endpoints resource, must be unique. Cannot be updated. This name should correspond with an accompanying Service resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the endpoints resource must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this endpoints resource that can be used by clients to determine when endpoints resource has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this endpoints resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `subset` - -#### Arguments - -* `address` - (Optional) An IP address block which offers the related ports and is ready to accept traffic. These endpoints should be considered safe for load balancers and clients to utilize. Can be repeated multiple times. -* `not_ready_address` - (Optional) A IP address block which offers the related ports but is not currently marked as ready because it have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. Can be repeated multiple times. -* `port` - (Optional) A port number block available on the related IP addresses. Can be repeated multiple times. - -### `address` - -#### Attributes - -* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). -* `hostname` - (Optional) The Hostname of this endpoint. -* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node. - -### `not_ready_address` - -#### Attributes - -* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). -* `hostname` - (Optional) The Hostname of this endpoint. -* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node. - -### `port` - -#### Arguments - -* `name` - (Optional) The name of this port within the endpoint. All ports within the endpoint must have unique names. Optional if only one port is defined on this endpoint. -* `port` - (Required) The port that will be utilized by this endpoint. -* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. - ## Import An Endpoints resource can be imported using its namespace and name, e.g. diff --git a/docs/resources/env.md b/docs/resources/env.md index 32bd8764b9..c382995046 100644 --- a/docs/resources/env.md +++ b/docs/resources/env.md @@ -9,99 +9,130 @@ description: |- This resource provides a way to manage environment variables in resources that were created outside of Terraform. This resource provides functionality similar to the `kubectl set env` command. -## Example Usage + +## Schema -```terraform -resource "kubernetes_env" "example" { - container = "nginx" - metadata { - name = "nginx-deployment" - } +### Required - api_version = "apps/v1" - kind = "Deployment" +- `api_version` (String) Resource API version +- `env` (Block List, Min: 1) List of custom values used to represent environment variables (see [below for nested schema](#nestedblock--env)) +- `kind` (String) Resource Kind +- `metadata` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--metadata)) - env { - name = "NGINX_HOST" - value = "google.com" - } +### Optional - env { - name = "NGINX_PORT" - value = "90" - } -} -``` +- `container` (String) Name of the container for which we are updating the environment variables. +- `field_manager` (String) Set the name of the field manager for the specified environment variables. +- `force` (Boolean) Force overwriting environments that were created or edited outside of Terraform. +- `init_container` (String) Name of the initContainer for which we are updating the environment variables. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--env--value_from)) + + +### Nested Schema for `env.value_from` + +Optional: -## Argument Reference +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--env--value_from--secret_key_ref)) -The following arguments are supported: + +### Nested Schema for `env.value_from.config_map_key_ref` -* `api_version` - (Required) The apiVersion of the resource to add environment variables to. -* `kind` - (Required) The kind of the resource to add environment variables to. -* `metadata` - (Required) Standard metadata of the resource to add environment variables to. -* `container` - (Optional) Name of the container for which we are updating the environment variables. -* `init_container` - (Optional) Name of the initContainer for which we are updating the environment variables. -* `env` - (Required) Value block with custom values used to represent environment variables -* `force` - (Optional) Force management of environment variables if there is a conflict. -* `field_manager` - (Optional) The name of the [field manager](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management). Defaults to `Terraform`. +Optional: -## Nested Blocks +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. -### `metadata` -#### Arguments + +### Nested Schema for `env.value_from.field_ref` -* `name` - (Required) Name of the resource to add environment variables to. -* `namespace` - (Optional) Namespace of the resource to add environment variables to. +Optional: -### `env` +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version -#### Arguments -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value + +### Nested Schema for `env.value_from.resource_field_ref` -### `value_from` +Required: -#### Arguments +- `resource` (String) Resource to select -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. +Optional: -### `config_map_key_ref` +- `container_name` (String) +- `divisor` (String) -#### Arguments -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined + +### Nested Schema for `env.value_from.secret_key_ref` -### `field_ref` +Optional: -#### Arguments +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version -### `resource_field_ref` -#### Arguments -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". + +### Nested Schema for `metadata` -### `secret_key_ref` +Required: -#### Arguments +- `name` (String) The name of the resource. -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined +Optional: + +- `namespace` (String) The namespace of the resource. + + + + +## Example Usage + +```terraform +resource "kubernetes_env" "example" { + container = "nginx" + metadata { + name = "nginx-deployment" + } + + api_version = "apps/v1" + kind = "Deployment" + + env { + name = "NGINX_HOST" + value = "google.com" + } + + env { + name = "NGINX_PORT" + value = "90" + } +} +``` ## Import diff --git a/docs/resources/horizontal_pod_autoscaler.md b/docs/resources/horizontal_pod_autoscaler.md index c57805a1ff..5831c624f0 100644 --- a/docs/resources/horizontal_pod_autoscaler.md +++ b/docs/resources/horizontal_pod_autoscaler.md @@ -9,6 +9,373 @@ description: |- Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard horizontal pod autoscaler's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this horizontal pod autoscaler. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `max_replicas` (Number) Upper limit for the number of pods that can be set by the autoscaler. +- `scale_target_ref` (Block List, Min: 1, Max: 1) Reference to scaled resource. e.g. Replication Controller (see [below for nested schema](#nestedblock--spec--scale_target_ref)) + +Optional: + +- `behavior` (Block List, Max: 1) Behavior configures the scaling behavior of the target in both Up and Down directions (`scale_up` and `scale_down` fields respectively). (see [below for nested schema](#nestedblock--spec--behavior)) +- `metric` (Block List) The specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization. (see [below for nested schema](#nestedblock--spec--metric)) +- `min_replicas` (Number) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. +- `target_cpu_utilization_percentage` (Number) Target average CPU utilization (represented as a percentage of requested CPU) over all the pods. If not specified the default autoscaling policy will be used. + + +### Nested Schema for `spec.scale_target_ref` + +Required: + +- `kind` (String) Kind of the referent. e.g. `ReplicationController`. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `api_version` (String) API version of the referent + + + +### Nested Schema for `spec.behavior` + +Optional: + +- `scale_down` (Block List) Scaling policy for scaling Down (see [below for nested schema](#nestedblock--spec--behavior--scale_down)) +- `scale_up` (Block List) Scaling policy for scaling Up (see [below for nested schema](#nestedblock--spec--behavior--scale_up)) + + +### Nested Schema for `spec.behavior.scale_down` + +Required: + +- `policy` (Block List, Min: 1) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. (see [below for nested schema](#nestedblock--spec--behavior--scale_down--policy)) + +Optional: + +- `select_policy` (String) Used to specify which policy should be used. If not set, the default value Max is used. +- `stabilization_window_seconds` (Number) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + + +### Nested Schema for `spec.behavior.scale_down.policy` + +Required: + +- `period_seconds` (Number) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). +- `type` (String) Type is used to specify the scaling policy: Percent or Pods +- `value` (Number) Value contains the amount of change which is permitted by the policy. It must be greater than zero. + + + + +### Nested Schema for `spec.behavior.scale_up` + +Required: + +- `policy` (Block List, Min: 1) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. (see [below for nested schema](#nestedblock--spec--behavior--scale_up--policy)) + +Optional: + +- `select_policy` (String) Used to specify which policy should be used. If not set, the default value Max is used. +- `stabilization_window_seconds` (Number) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + + +### Nested Schema for `spec.behavior.scale_up.policy` + +Required: + +- `period_seconds` (Number) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). +- `type` (String) Type is used to specify the scaling policy: Percent or Pods +- `value` (Number) Value contains the amount of change which is permitted by the policy. It must be greater than zero. + + + + + +### Nested Schema for `spec.metric` + +Required: + +- `type` (String) type is the type of metric source. It should be one of "ContainerResource", "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object. Note: "ContainerResource" type is available on when the feature-gate HPAContainerMetrics is enabled + +Optional: + +- `container_resource` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--container_resource)) +- `external` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--external)) +- `object` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--object)) +- `pods` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--pods)) +- `resource` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--resource)) + + +### Nested Schema for `spec.metric.container_resource` + +Required: + +- `container` (String) name of the container in the pods of the scaling target +- `name` (String) name of the resource in question + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--container_resource--target)) + + +### Nested Schema for `spec.metric.container_resource.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.external` + +Required: + +- `metric` (Block List, Min: 1, Max: 1) metric identifies the target metric by name and selector (see [below for nested schema](#nestedblock--spec--metric--external--metric)) + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--external--target)) + + +### Nested Schema for `spec.metric.external.metric` + +Required: + +- `name` (String) name is the name of the given metric + +Optional: + +- `selector` (Block List) selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. (see [below for nested schema](#nestedblock--spec--metric--external--metric--selector)) + + +### Nested Schema for `spec.metric.external.metric.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--metric--external--metric--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.metric.external.metric.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.metric.external.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.object` + +Required: + +- `described_object` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--object--described_object)) +- `metric` (Block List, Min: 1, Max: 1) metric identifies the target metric by name and selector (see [below for nested schema](#nestedblock--spec--metric--object--metric)) + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--object--target)) + + +### Nested Schema for `spec.metric.object.described_object` + +Required: + +- `api_version` (String) API version of the referent +- `kind` (String) Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +- `name` (String) Name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.metric.object.metric` + +Required: + +- `name` (String) name is the name of the given metric + +Optional: + +- `selector` (Block List) selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. (see [below for nested schema](#nestedblock--spec--metric--object--metric--selector)) + + +### Nested Schema for `spec.metric.object.metric.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--metric--object--metric--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.metric.object.metric.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.metric.object.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.pods` + +Required: + +- `metric` (Block List, Min: 1, Max: 1) metric identifies the target metric by name and selector (see [below for nested schema](#nestedblock--spec--metric--pods--metric)) + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--pods--target)) + + +### Nested Schema for `spec.metric.pods.metric` + +Required: + +- `name` (String) name is the name of the given metric + +Optional: + +- `selector` (Block List) selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. (see [below for nested schema](#nestedblock--spec--metric--pods--metric--selector)) + + +### Nested Schema for `spec.metric.pods.metric.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--metric--pods--metric--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.metric.pods.metric.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.metric.pods.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.resource` + +Required: + +- `name` (String) name is the name of the resource in question. + +Optional: + +- `target` (Block List, Max: 1) Target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--resource--target)) + + +### Nested Schema for `spec.metric.resource.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + + + + ## Example Usage ```terraform @@ -127,146 +494,6 @@ If you wish to use `autoscaling/v1` use the `target_cpu_utilization_percentage` If you wish to use `autoscaling/v2beta2` then set one or more `metric` fields. -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard horizontal pod autoscaler's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Behaviour of the autoscaler. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this horizontal pod autoscaler. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `max_replicas` - (Required) Upper limit for the number of pods that can be set by the autoscaler. -* `min_replicas` - (Optional) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. -* `scale_target_ref` - (Required) Reference to scaled resource. e.g. Replication Controller -* `target_cpu_utilization_percentage` - (Optional) Target average CPU utilization (represented as a percentage of requested CPU) over all the pods. If not specified the default autoscaling policy will be used. -* `metric` - (Optional) A metric on which to scale. -* `behavior` - (Optional) Behavior configures the scaling behavior of the target in both Up and Down directions (scale_up and scale_down fields respectively) - -### `metric` - -#### Arguments - -* `type` - (Required) The type of metric. It can be one of "Object", "Pods", "Resource", or "External". -* `object` - (Optional) A metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). -* `pods` - (Optional) A metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. -* `resource` - (Optional) A resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. -* `external` - (Optional) A global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). - -### Metric Type: `external` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `object` - -#### Arguments - -* `described_object` - (Required) Reference to the object. -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `pods` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `resource` - -#### Arguments - -* `name` - (Required) Name of the resource in question. -* `target` - (Required) The target for the given metric. - -### `metric` - -#### Arguments - -* `name` - (Required) The name of the given metric -* `selector` - (Optional) The label selector for the given metric - -### `target` - -#### Arguments - -* `type` - (Required) Represents whether the metric type is Utilization, Value, or AverageValue. -* `average_value` - (Optional) The target value of the average of the metric across all relevant pods (as a quantity). -* `average_utilization` - (Optional) The target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type. -* `value` - (Optional) value is the target value of the metric (as a quantity). - -#### Quantities - -See [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for documentation on resource management for pods and containers. - -### `described_object` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `scale_target_ref` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `behavior` - -#### Arguments - -* `scale_up` - (Optional) Scaling policy for scaling Up -* `scale_down` - (Optional) Scaling policy for scaling Down - -### `scale_up` - -#### Arguments - -* `policy` - (Required) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. -* `select_policy` - (Optional) Used to specify which policy should be used. If not set, the default value Max is used. -* `stabilization_window_seconds` - (Optional) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). - -### `policy` - -#### Arguments - -* `period_seconds` - (Required) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). -* `type` - (Required) Type is used to specify the scaling policy: Percent or Pods -* `value` - (Required) Value contains the amount of change which is permitted by the policy. It must be greater than zero. - ## Import Horizontal Pod Autoscaler can be imported using the namespace and name, e.g. diff --git a/docs/resources/horizontal_pod_autoscaler_v1.md b/docs/resources/horizontal_pod_autoscaler_v1.md index 5fd3bdd991..286e6f42a3 100644 --- a/docs/resources/horizontal_pod_autoscaler_v1.md +++ b/docs/resources/horizontal_pod_autoscaler_v1.md @@ -5,77 +5,88 @@ description: |- Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. --- -# kubernetes_horizontal_pod_autoscaler_v1 +# kubernetes_horizontal_pod_autoscaler_v1 Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. -## Example Usage + +## Schema -```terraform -resource "kubernetes_horizontal_pod_autoscaler_v1" "example" { - metadata { - name = "terraform-example" - } +### Required - spec { - max_replicas = 10 - min_replicas = 8 +- `metadata` (Block List, Min: 1, Max: 1) Standard horizontal pod autoscaler's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) - scale_target_ref { - kind = "Deployment" - name = "MyApp" - } - } -} -``` +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: -## Argument Reference +- `annotations` (Map of String) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. -The following arguments are supported: +Read-Only: -* `metadata` - (Required) Standard horizontal pod autoscaler's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Behaviour of the autoscaler. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this horizontal pod autoscaler. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -## Nested Blocks -### `metadata` + +### Nested Schema for `spec` -#### Arguments +Required: -* `annotations` - (Optional) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. +- `max_replicas` (Number) Upper limit for the number of pods that can be set by the autoscaler. +- `scale_target_ref` (Block List, Min: 1, Max: 1) Reference to scaled resource. e.g. Replication Controller (see [below for nested schema](#nestedblock--spec--scale_target_ref)) -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +Optional: -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. +- `min_replicas` (Number) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. +- `target_cpu_utilization_percentage` (Number) Target average CPU utilization (represented as a percentage of requested CPU) over all the pods. If not specified the default autoscaling policy will be used. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) + +### Nested Schema for `spec.scale_target_ref` -* `name` - (Optional) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. +Required: -#### Attributes +- `kind` (String) Kind of the referent. e.g. `ReplicationController`. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this horizontal pod autoscaler. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +Optional: -### `spec` +- `api_version` (String) API version of the referent -#### Arguments -* `max_replicas` - (Required) Upper limit for the number of pods that can be set by the autoscaler. -* `min_replicas` - (Optional) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. -* `scale_target_ref` - (Required) Reference to scaled resource. e.g. Replication Controller -* `target_cpu_utilization_percentage` - (Optional) Target average CPU utilization (represented as a percentage of requested CPU) over all the pods. If not specified the default autoscaling policy will be used. -### `scale_target_ref` -#### Arguments -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +## Example Usage + +```terraform +resource "kubernetes_horizontal_pod_autoscaler_v1" "example" { + metadata { + name = "terraform-example" + } + + spec { + max_replicas = 10 + min_replicas = 8 + + scale_target_ref { + kind = "Deployment" + name = "MyApp" + } + } +} +``` ## Import diff --git a/docs/resources/horizontal_pod_autoscaler_v2.md b/docs/resources/horizontal_pod_autoscaler_v2.md index b7e146afd4..899d3feacb 100644 --- a/docs/resources/horizontal_pod_autoscaler_v2.md +++ b/docs/resources/horizontal_pod_autoscaler_v2.md @@ -9,6 +9,373 @@ description: |- Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard horizontal pod autoscaler's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this horizontal pod autoscaler. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `max_replicas` (Number) Upper limit for the number of pods that can be set by the autoscaler. +- `scale_target_ref` (Block List, Min: 1, Max: 1) Reference to scaled resource. e.g. Replication Controller (see [below for nested schema](#nestedblock--spec--scale_target_ref)) + +Optional: + +- `behavior` (Block List, Max: 1) Behavior configures the scaling behavior of the target in both Up and Down directions (`scale_up` and `scale_down` fields respectively). (see [below for nested schema](#nestedblock--spec--behavior)) +- `metric` (Block List) The specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization. (see [below for nested schema](#nestedblock--spec--metric)) +- `min_replicas` (Number) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. +- `target_cpu_utilization_percentage` (Number) Target average CPU utilization (represented as a percentage of requested CPU) over all the pods. If not specified the default autoscaling policy will be used. + + +### Nested Schema for `spec.scale_target_ref` + +Required: + +- `kind` (String) Kind of the referent. e.g. `ReplicationController`. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `api_version` (String) API version of the referent + + + +### Nested Schema for `spec.behavior` + +Optional: + +- `scale_down` (Block List) Scaling policy for scaling Down (see [below for nested schema](#nestedblock--spec--behavior--scale_down)) +- `scale_up` (Block List) Scaling policy for scaling Up (see [below for nested schema](#nestedblock--spec--behavior--scale_up)) + + +### Nested Schema for `spec.behavior.scale_down` + +Required: + +- `policy` (Block List, Min: 1) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. (see [below for nested schema](#nestedblock--spec--behavior--scale_down--policy)) + +Optional: + +- `select_policy` (String) Used to specify which policy should be used. If not set, the default value Max is used. +- `stabilization_window_seconds` (Number) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + + +### Nested Schema for `spec.behavior.scale_down.policy` + +Required: + +- `period_seconds` (Number) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). +- `type` (String) Type is used to specify the scaling policy: Percent or Pods +- `value` (Number) Value contains the amount of change which is permitted by the policy. It must be greater than zero. + + + + +### Nested Schema for `spec.behavior.scale_up` + +Required: + +- `policy` (Block List, Min: 1) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. (see [below for nested schema](#nestedblock--spec--behavior--scale_up--policy)) + +Optional: + +- `select_policy` (String) Used to specify which policy should be used. If not set, the default value Max is used. +- `stabilization_window_seconds` (Number) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + + +### Nested Schema for `spec.behavior.scale_up.policy` + +Required: + +- `period_seconds` (Number) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). +- `type` (String) Type is used to specify the scaling policy: Percent or Pods +- `value` (Number) Value contains the amount of change which is permitted by the policy. It must be greater than zero. + + + + + +### Nested Schema for `spec.metric` + +Required: + +- `type` (String) type is the type of metric source. It should be one of "ContainerResource", "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object. Note: "ContainerResource" type is available on when the feature-gate HPAContainerMetrics is enabled + +Optional: + +- `container_resource` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--container_resource)) +- `external` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--external)) +- `object` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--object)) +- `pods` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--pods)) +- `resource` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--resource)) + + +### Nested Schema for `spec.metric.container_resource` + +Required: + +- `container` (String) name of the container in the pods of the scaling target +- `name` (String) name of the resource in question + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--container_resource--target)) + + +### Nested Schema for `spec.metric.container_resource.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.external` + +Required: + +- `metric` (Block List, Min: 1, Max: 1) metric identifies the target metric by name and selector (see [below for nested schema](#nestedblock--spec--metric--external--metric)) + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--external--target)) + + +### Nested Schema for `spec.metric.external.metric` + +Required: + +- `name` (String) name is the name of the given metric + +Optional: + +- `selector` (Block List) selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. (see [below for nested schema](#nestedblock--spec--metric--external--metric--selector)) + + +### Nested Schema for `spec.metric.external.metric.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--metric--external--metric--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.metric.external.metric.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.metric.external.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.object` + +Required: + +- `described_object` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--object--described_object)) +- `metric` (Block List, Min: 1, Max: 1) metric identifies the target metric by name and selector (see [below for nested schema](#nestedblock--spec--metric--object--metric)) + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--object--target)) + + +### Nested Schema for `spec.metric.object.described_object` + +Required: + +- `api_version` (String) API version of the referent +- `kind` (String) Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +- `name` (String) Name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.metric.object.metric` + +Required: + +- `name` (String) name is the name of the given metric + +Optional: + +- `selector` (Block List) selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. (see [below for nested schema](#nestedblock--spec--metric--object--metric--selector)) + + +### Nested Schema for `spec.metric.object.metric.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--metric--object--metric--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.metric.object.metric.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.metric.object.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.pods` + +Required: + +- `metric` (Block List, Min: 1, Max: 1) metric identifies the target metric by name and selector (see [below for nested schema](#nestedblock--spec--metric--pods--metric)) + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--pods--target)) + + +### Nested Schema for `spec.metric.pods.metric` + +Required: + +- `name` (String) name is the name of the given metric + +Optional: + +- `selector` (Block List) selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. (see [below for nested schema](#nestedblock--spec--metric--pods--metric--selector)) + + +### Nested Schema for `spec.metric.pods.metric.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--metric--pods--metric--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.metric.pods.metric.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.metric.pods.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.resource` + +Required: + +- `name` (String) name is the name of the resource in question. + +Optional: + +- `target` (Block List, Max: 1) Target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--resource--target)) + + +### Nested Schema for `spec.metric.resource.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + + + + ## Example Usage, with `metric` ```terraform @@ -99,154 +466,6 @@ resource "kubernetes_horizontal_pod_autoscaler_v2" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard horizontal pod autoscaler's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Behaviour of the autoscaler. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this horizontal pod autoscaler. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `max_replicas` - (Required) Upper limit for the number of pods that can be set by the autoscaler. -* `min_replicas` - (Optional) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. -* `scale_target_ref` - (Required) Reference to scaled resource. e.g. Replication Controller -* `metric` - (Optional) A metric on which to scale. -* `behavior` - (Optional) Behavior configures the scaling behavior of the target in both Up and Down directions (`scale_up` and `scale_down` fields respectively) - -### `metric` - -#### Arguments - -* `type` - (Required) The type of metric. It can be one of "Object", "Pods", "Resource", "External", or "ContainerResource". -* `object` - (Optional) A metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). -* `pods` - (Optional) A metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. -* `resource` - (Optional) A resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. -* `external` - (Optional) A global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). -* `container_resource` - (Optional) A resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. - -### Metric Type: `container_resource` - -#### Arguments - -* `container` - (Required) Name of the container in the pods of the scaling target. -* `name` - (Required) Name of the resource in question. -* `target` - (Required) The target for the given metric. - -### Metric Type: `external` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `object` - -#### Arguments - -* `described_object` - (Required) Reference to the object. -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `pods` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `resource` - -#### Arguments - -* `name` - (Required) Name of the resource in question. -* `target` - (Required) The target for the given metric. - -### `metric` - -#### Arguments - -* `name` - (Required) The name of the given metric -* `selector` - (Optional) The label selector for the given metric - -### `target` - -#### Arguments - -* `type` - (Required) Represents whether the metric type is Utilization, Value, or AverageValue. -* `average_value` - (Optional) The target value of the average of the metric across all relevant pods (as a quantity). -* `average_utilization` - (Optional) The target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type. -* `value` - (Optional) value is the target value of the metric (as a quantity). - -#### Quantities - -See [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for documentation on resource management for pods and containers. - -### `described_object` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `scale_target_ref` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `behavior` - -#### Arguments - -* `scale_up` - (Optional) Scaling policy for scaling Up -* `scale_down` - (Optional) Scaling policy for scaling Down - -### `scale_up` - -#### Arguments - -* `policy` - (Required) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. -* `select_policy` - (Optional) Used to specify which policy should be used. If not set, the default value Max is used. -* `stabilization_window_seconds` - (Optional) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). - -### `policy` - -#### Arguments - -* `period_seconds` - (Required) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). -* `type` - (Required) Type is used to specify the scaling policy: Percent or Pods -* `value` - (Required) Value contains the amount of change which is permitted by the policy. It must be greater than zero. - ## Import Horizontal Pod Autoscaler can be imported using the namespace and name, e.g. diff --git a/docs/resources/horizontal_pod_autoscaler_v2beta2.md b/docs/resources/horizontal_pod_autoscaler_v2beta2.md index 09157ff156..cabf3fff6a 100644 --- a/docs/resources/horizontal_pod_autoscaler_v2beta2.md +++ b/docs/resources/horizontal_pod_autoscaler_v2beta2.md @@ -9,6 +9,373 @@ description: |- Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard horizontal pod autoscaler's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this horizontal pod autoscaler. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `max_replicas` (Number) Upper limit for the number of pods that can be set by the autoscaler. +- `scale_target_ref` (Block List, Min: 1, Max: 1) Reference to scaled resource. e.g. Replication Controller (see [below for nested schema](#nestedblock--spec--scale_target_ref)) + +Optional: + +- `behavior` (Block List, Max: 1) Behavior configures the scaling behavior of the target in both Up and Down directions (`scale_up` and `scale_down` fields respectively). (see [below for nested schema](#nestedblock--spec--behavior)) +- `metric` (Block List) The specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization. (see [below for nested schema](#nestedblock--spec--metric)) +- `min_replicas` (Number) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. +- `target_cpu_utilization_percentage` (Number) Target average CPU utilization (represented as a percentage of requested CPU) over all the pods. If not specified the default autoscaling policy will be used. + + +### Nested Schema for `spec.scale_target_ref` + +Required: + +- `kind` (String) Kind of the referent. e.g. `ReplicationController`. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `api_version` (String) API version of the referent + + + +### Nested Schema for `spec.behavior` + +Optional: + +- `scale_down` (Block List) Scaling policy for scaling Down (see [below for nested schema](#nestedblock--spec--behavior--scale_down)) +- `scale_up` (Block List) Scaling policy for scaling Up (see [below for nested schema](#nestedblock--spec--behavior--scale_up)) + + +### Nested Schema for `spec.behavior.scale_down` + +Required: + +- `policy` (Block List, Min: 1) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. (see [below for nested schema](#nestedblock--spec--behavior--scale_down--policy)) + +Optional: + +- `select_policy` (String) Used to specify which policy should be used. If not set, the default value Max is used. +- `stabilization_window_seconds` (Number) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + + +### Nested Schema for `spec.behavior.scale_down.policy` + +Required: + +- `period_seconds` (Number) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). +- `type` (String) Type is used to specify the scaling policy: Percent or Pods +- `value` (Number) Value contains the amount of change which is permitted by the policy. It must be greater than zero. + + + + +### Nested Schema for `spec.behavior.scale_up` + +Required: + +- `policy` (Block List, Min: 1) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. (see [below for nested schema](#nestedblock--spec--behavior--scale_up--policy)) + +Optional: + +- `select_policy` (String) Used to specify which policy should be used. If not set, the default value Max is used. +- `stabilization_window_seconds` (Number) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + + +### Nested Schema for `spec.behavior.scale_up.policy` + +Required: + +- `period_seconds` (Number) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). +- `type` (String) Type is used to specify the scaling policy: Percent or Pods +- `value` (Number) Value contains the amount of change which is permitted by the policy. It must be greater than zero. + + + + + +### Nested Schema for `spec.metric` + +Required: + +- `type` (String) type is the type of metric source. It should be one of "ContainerResource", "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object. Note: "ContainerResource" type is available on when the feature-gate HPAContainerMetrics is enabled + +Optional: + +- `container_resource` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--container_resource)) +- `external` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--external)) +- `object` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--object)) +- `pods` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--pods)) +- `resource` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--resource)) + + +### Nested Schema for `spec.metric.container_resource` + +Required: + +- `container` (String) name of the container in the pods of the scaling target +- `name` (String) name of the resource in question + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--container_resource--target)) + + +### Nested Schema for `spec.metric.container_resource.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.external` + +Required: + +- `metric` (Block List, Min: 1, Max: 1) metric identifies the target metric by name and selector (see [below for nested schema](#nestedblock--spec--metric--external--metric)) + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--external--target)) + + +### Nested Schema for `spec.metric.external.metric` + +Required: + +- `name` (String) name is the name of the given metric + +Optional: + +- `selector` (Block List) selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. (see [below for nested schema](#nestedblock--spec--metric--external--metric--selector)) + + +### Nested Schema for `spec.metric.external.metric.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--metric--external--metric--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.metric.external.metric.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.metric.external.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.object` + +Required: + +- `described_object` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--spec--metric--object--described_object)) +- `metric` (Block List, Min: 1, Max: 1) metric identifies the target metric by name and selector (see [below for nested schema](#nestedblock--spec--metric--object--metric)) + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--object--target)) + + +### Nested Schema for `spec.metric.object.described_object` + +Required: + +- `api_version` (String) API version of the referent +- `kind` (String) Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +- `name` (String) Name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.metric.object.metric` + +Required: + +- `name` (String) name is the name of the given metric + +Optional: + +- `selector` (Block List) selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. (see [below for nested schema](#nestedblock--spec--metric--object--metric--selector)) + + +### Nested Schema for `spec.metric.object.metric.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--metric--object--metric--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.metric.object.metric.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.metric.object.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.pods` + +Required: + +- `metric` (Block List, Min: 1, Max: 1) metric identifies the target metric by name and selector (see [below for nested schema](#nestedblock--spec--metric--pods--metric)) + +Optional: + +- `target` (Block List, Max: 1) target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--pods--target)) + + +### Nested Schema for `spec.metric.pods.metric` + +Required: + +- `name` (String) name is the name of the given metric + +Optional: + +- `selector` (Block List) selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. (see [below for nested schema](#nestedblock--spec--metric--pods--metric--selector)) + + +### Nested Schema for `spec.metric.pods.metric.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--metric--pods--metric--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.metric.pods.metric.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.metric.pods.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + +### Nested Schema for `spec.metric.resource` + +Required: + +- `name` (String) name is the name of the resource in question. + +Optional: + +- `target` (Block List, Max: 1) Target specifies the target value for the given metric (see [below for nested schema](#nestedblock--spec--metric--resource--target)) + + +### Nested Schema for `spec.metric.resource.target` + +Required: + +- `type` (String) type represents whether the metric type is Utilization, Value, or AverageValue + +Optional: + +- `average_utilization` (Number) averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type +- `average_value` (String) averageValue is the target value of the average of the metric across all relevant pods (as a quantity) +- `value` (String) value is the target value of the metric (as a quantity). + + + + + + + ## Example Usage, with `metric` ```terraform @@ -99,154 +466,6 @@ resource "kubernetes_horizontal_pod_autoscaler_v2beta2" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard horizontal pod autoscaler's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Behaviour of the autoscaler. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this horizontal pod autoscaler. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `max_replicas` - (Required) Upper limit for the number of pods that can be set by the autoscaler. -* `min_replicas` - (Optional) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. -* `scale_target_ref` - (Required) Reference to scaled resource. e.g. Replication Controller -* `metric` - (Optional) A metric on which to scale. -* `behavior` - (Optional) Behavior configures the scaling behavior of the target in both Up and Down directions (`scale_up` and `scale_down` fields respectively) - -### `metric` - -#### Arguments - -* `type` - (Required) The type of metric. It can be one of "Object", "Pods", "Resource", "External", or "ContainerResource". -* `object` - (Optional) A metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). -* `pods` - (Optional) A metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. -* `resource` - (Optional) A resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. -* `external` - (Optional) A global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). -* `container_resource` - (Optional) A resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. - -### Metric Type: `container_resource` - -#### Arguments - -* `container` - (Required) Name of the container in the pods of the scaling target. -* `name` - (Required) Name of the resource in question. -* `target` - (Required) The target for the given metric. - -### Metric Type: `external` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `object` - -#### Arguments - -* `described_object` - (Required) Reference to the object. -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `pods` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `resource` - -#### Arguments - -* `name` - (Required) Name of the resource in question. -* `target` - (Required) The target for the given metric. - -### `metric` - -#### Arguments - -* `name` - (Required) The name of the given metric -* `selector` - (Optional) The label selector for the given metric - -### `target` - -#### Arguments - -* `type` - (Required) Represents whether the metric type is Utilization, Value, or AverageValue. -* `average_value` - (Optional) The target value of the average of the metric across all relevant pods (as a quantity). -* `average_utilization` - (Optional) The target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type. -* `value` - (Optional) value is the target value of the metric (as a quantity). - -#### Quantities - -See [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for documentation on resource management for pods and containers. - -### `described_object` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `scale_target_ref` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `behavior` - -#### Arguments - -* `scale_up` - (Optional) Scaling policy for scaling Up -* `scale_down` - (Optional) Scaling policy for scaling Down - -### `scale_up` - -#### Arguments - -* `policy` - (Required) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. -* `select_policy` - (Optional) Used to specify which policy should be used. If not set, the default value Max is used. -* `stabilization_window_seconds` - (Optional) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). - -### `policy` - -#### Arguments - -* `period_seconds` - (Required) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). -* `type` - (Required) Type is used to specify the scaling policy: Percent or Pods -* `value` - (Required) Value contains the amount of change which is permitted by the policy. It must be greater than zero. - ## Import Horizontal Pod Autoscaler can be imported using the namespace and name, e.g. diff --git a/docs/resources/ingress.md b/docs/resources/ingress.md index a6becfbc9c..406395ad1c 100644 --- a/docs/resources/ingress.md +++ b/docs/resources/ingress.md @@ -9,6 +9,143 @@ description: |- Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard ingress's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `wait_for_load_balancer` (Boolean) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. + +### Read-Only + +- `id` (String) The ID of this resource. +- `status` (List of Object) (see [below for nested schema](#nestedatt--status)) + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the ingress that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the ingress. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the ingress, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the ingress must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this ingress that can be used by clients to determine when ingress has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this ingress. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Optional: + +- `backend` (Block List, Max: 1) A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. (see [below for nested schema](#nestedblock--spec--backend)) +- `ingress_class_name` (String) ingressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation. +- `rule` (Block List) (see [below for nested schema](#nestedblock--spec--rule)) +- `tls` (Block List) tls represents the TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. (see [below for nested schema](#nestedblock--spec--tls)) + + +### Nested Schema for `spec.backend` + +Optional: + +- `service_name` (String) Specifies the name of the referenced service. +- `service_port` (String) Specifies the port of the referenced service. + + + +### Nested Schema for `spec.rule` + +Required: + +- `http` (Block List, Min: 1, Max: 1) http is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'. (see [below for nested schema](#nestedblock--spec--rule--http)) + +Optional: + +- `host` (String) host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the "host" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + the IP in the Spec of the parent Ingress. + +2. The `:` delimiter is not respected because ports are not allowed. + Currently the port of an Ingress is implicitly :80 for http and + :443 for https. +Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue. + +host can be "precise" which is a domain name without the terminating dot of a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. "*.foo.com"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule. + + +### Nested Schema for `spec.rule.http` + +Required: + +- `path` (Block List, Min: 1) (see [below for nested schema](#nestedblock--spec--rule--http--path)) + + +### Nested Schema for `spec.rule.http.path` + +Optional: + +- `backend` (Block List, Max: 1) Backend defines the referenced service endpoint to which the traffic will be forwarded to. (see [below for nested schema](#nestedblock--spec--rule--http--path--backend)) +- `path` (String) path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value "Exact" or "Prefix". + + +### Nested Schema for `spec.rule.http.path.backend` + +Optional: + +- `service_name` (String) Specifies the name of the referenced service. +- `service_port` (String) Specifies the port of the referenced service. + + + + + + +### Nested Schema for `spec.tls` + +Optional: + +- `hosts` (List of String) hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified. +- `secret_name` (String) secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing. + + + + +### Nested Schema for `status` + +Read-Only: + +- `load_balancer` (List of Object) (see [below for nested schema](#nestedobjatt--status--load_balancer)) + + +### Nested Schema for `status.load_balancer` + +Read-Only: + +- `ingress` (List of Object) (see [below for nested schema](#nestedobjatt--status--load_balancer--ingress)) + + +### Nested Schema for `status.load_balancer.ingress` + +Read-Only: + +- `hostname` (String) +- `ip` (String) + + + + + + ## Example Usage ```terraform @@ -179,96 +316,6 @@ output "load_balancer_ip" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard ingress's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Spec defines the behavior of a ingress. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `false`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the ingress that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `backend` - (Optional) Backend defines the referenced service endpoint to which the traffic will be forwarded. See `backend` block attributes below. -* `rule` - (Optional) A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. See `rule` block attributes below. -* `tls` - (Optional) TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. See `tls` block attributes below. -* `ingress_class_name` - (Optional) The ingress class name references an IngressClass resource that contains additional configuration including the name of the controller that should implement the class. - -### `backend` - -#### Arguments - -* `service_name` - (Optional) Specifies the name of the referenced service. -* `service_port` - (Optional) Specifies the port of the referenced service. - -### `rule` - -#### Arguments - -* `host` - (Optional) Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the IP in the Spec of the parent Ingress. 2. The : delimiter is not respected because ports are not allowed. Currently the port of an Ingress is implicitly :80 for http and :443 for https. Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue. -* `http` - (Required) http is a list of http selectors pointing to backends. In the example: http:///? -> backend where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'. See `http` block attributes below. - -#### `http` - -* `path` - (Required) Path array of path regex associated with a backend. Incoming urls matching the path are forwarded to the backend, see below for `path` block structure. - -#### `path` - -* `path` - (Required) A string or an extended POSIX regular expression as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. -* `backend` - (Required) Backend defines the referenced service endpoint to which the traffic will be forwarded to. - -### `tls` - -#### Arguments - -* `hosts` - (Optional) Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified. -* `secret_name` - (Optional) SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing. - -## Attributes - -### `status` - -* `status` - Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -#### `load_balancer` - -* LoadBalancer contains the current status of the load-balancer, if one is present. - -##### `ingress` - -* `ingress` - Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - -###### Attributes - -* `ip` - IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers). -* `hostname` - Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers). - ## Import Ingress can be imported using its namespace and name: diff --git a/docs/resources/ingress_class.md b/docs/resources/ingress_class.md index 50b7179aa9..700081eb31 100644 --- a/docs/resources/ingress_class.md +++ b/docs/resources/ingress_class.md @@ -9,72 +9,79 @@ description: |- Ingresses can be implemented by different controllers, often with different configuration. Each Ingress should specify a class, a reference to an IngressClass resource that contains additional configuration including the name of the controller that should implement the class. -## Example Usage + +## Schema -```terraform -resource "kubernetes_ingress_class" "example" { - metadata { - name = "example" - } +### Required - spec { - controller = "example.com/ingress-controller" - parameters { - api_group = "k8s.example.com" - kind = "IngressParameters" - name = "external-lb" - } - } -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard ingress_class_v1's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. -## Argument Reference + +### Nested Schema for `metadata` -The following arguments are supported: +Optional: -* `metadata` - (Required) Standard ingress's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Spec defines the behavior of a ingress. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `false`. +- `annotations` (Map of String) An unstructured key value map stored with the ingress_class_v1 that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the ingress_class_v1. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the ingress_class_v1, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -## Nested Blocks +Read-Only: -### `metadata` +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this ingress_class_v1 that can be used by clients to determine when ingress_class_v1 has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this ingress_class_v1. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -#### Arguments -* `annotations` - (Optional) An unstructured key value map stored with the ingress that may be used to store arbitrary metadata. + +### Nested Schema for `spec` -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +Optional: -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. +- `controller` (String) controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. +- `parameters` (Block List) (see [below for nested schema](#nestedblock--spec--parameters)) -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + +### Nested Schema for `spec.parameters` -* `name` - (Optional) Name of the ingress class, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +Required: -#### Attributes +- `kind` (String) Kind is the type of resource being referenced +- `name` (String) Name is the name of resource being referenced -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids +Optional: -### `spec` +- `api_group` (String) 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. +- `namespace` (String) +- `scope` (String) -#### Arguments -* `controller` - (Required) the name of the controller that should handle this class. -* `parameters` - (Optional) Parameters is a link to a custom resource containing additional configuration for the controller. See `parameters` block attributes below. -### `parameters` -#### Arguments -* `name` - (Required) The name of resource being referenced. -* `kind` - (Required) The type of resource being referenced. -* `api_group` - (Optional) The group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. -* `scope` - (Optional) Refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. -* `namespace` - (Optional) The namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". +## Example Usage + +```terraform +resource "kubernetes_ingress_class" "example" { + metadata { + name = "example" + } + + spec { + controller = "example.com/ingress-controller" + parameters { + api_group = "k8s.example.com" + kind = "IngressParameters" + name = "external-lb" + } + } +} +``` ## Import diff --git a/docs/resources/ingress_class_v1.md b/docs/resources/ingress_class_v1.md index 2cf81199d0..0f13202973 100644 --- a/docs/resources/ingress_class_v1.md +++ b/docs/resources/ingress_class_v1.md @@ -9,72 +9,79 @@ description: |- Ingresses can be implemented by different controllers, often with different configuration. Each Ingress should specify a class, a reference to an IngressClass resource that contains additional configuration including the name of the controller that should implement the class. -## Example Usage + +## Schema -```terraform -resource "kubernetes_ingress_class_v1" "example" { - metadata { - name = "example" - } +### Required - spec { - controller = "example.com/ingress-controller" - parameters { - api_group = "k8s.example.com" - kind = "IngressParameters" - name = "external-lb" - } - } -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard ingress_class_v1's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. -## Argument Reference + +### Nested Schema for `metadata` -The following arguments are supported: +Optional: -* `metadata` - (Required) Standard ingress's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Spec defines the behavior of a ingress. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `false`. +- `annotations` (Map of String) An unstructured key value map stored with the ingress_class_v1 that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the ingress_class_v1. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the ingress_class_v1, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -## Nested Blocks +Read-Only: -### `metadata` +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this ingress_class_v1 that can be used by clients to determine when ingress_class_v1 has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this ingress_class_v1. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -#### Arguments -* `annotations` - (Optional) An unstructured key value map stored with the ingress that may be used to store arbitrary metadata. + +### Nested Schema for `spec` -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +Optional: -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. +- `controller` (String) controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. +- `parameters` (Block List) (see [below for nested schema](#nestedblock--spec--parameters)) -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + +### Nested Schema for `spec.parameters` -* `name` - (Optional) Name of the ingress class, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +Required: -#### Attributes +- `kind` (String) Kind is the type of resource being referenced +- `name` (String) Name is the name of resource being referenced -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids +Optional: -### `spec` +- `api_group` (String) 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. +- `namespace` (String) +- `scope` (String) -#### Arguments -* `controller` - (Required) the name of the controller that should handle this class. -* `parameters` - (Optional) Parameters is a link to a custom resource containing additional configuration for the controller. See `parameters` block attributes below. -### `parameters` -#### Arguments -* `name` - (Required) The name of resource being referenced. -* `kind` - (Required) The type of resource being referenced. -* `api_group` - (Optional) The group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. -* `scope` - (Optional) Refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. -* `namespace` - (Optional) The namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". +## Example Usage + +```terraform +resource "kubernetes_ingress_class_v1" "example" { + metadata { + name = "example" + } + + spec { + controller = "example.com/ingress-controller" + parameters { + api_group = "k8s.example.com" + kind = "IngressParameters" + name = "external-lb" + } + } +} +``` ## Import diff --git a/docs/resources/ingress_v1.md b/docs/resources/ingress_v1.md index 09cb285c08..de09bf8f8c 100644 --- a/docs/resources/ingress_v1.md +++ b/docs/resources/ingress_v1.md @@ -9,6 +9,219 @@ description: |- Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard ingress's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_load_balancer` (Boolean) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. + +### Read-Only + +- `id` (String) The ID of this resource. +- `status` (List of Object) (see [below for nested schema](#nestedatt--status)) + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the ingress that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the ingress. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the ingress, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the ingress must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this ingress that can be used by clients to determine when ingress has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this ingress. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Optional: + +- `default_backend` (Block List, Max: 1) A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. (see [below for nested schema](#nestedblock--spec--default_backend)) +- `ingress_class_name` (String) ingressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -> IngressClass -> Ingress resource). Although the `kubernetes.io/ingress.class` annotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present. +- `rule` (Block List) (see [below for nested schema](#nestedblock--spec--rule)) +- `tls` (Block List) tls represents the TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. (see [below for nested schema](#nestedblock--spec--tls)) + + +### Nested Schema for `spec.default_backend` + +Optional: + +- `resource` (Block List, Max: 1) Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. (see [below for nested schema](#nestedblock--spec--default_backend--resource)) +- `service` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--default_backend--service)) + + +### Nested Schema for `spec.default_backend.resource` + +Required: + +- `api_group` (String) 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. +- `kind` (String) The kind of resource. +- `name` (String) The name of the User to bind to. + + + +### Nested Schema for `spec.default_backend.service` + +Required: + +- `name` (String) Specifies the name of the referenced service. +- `port` (Block List, Min: 1, Max: 1) Specifies the port of the referenced service. (see [below for nested schema](#nestedblock--spec--default_backend--service--port)) + + +### Nested Schema for `spec.default_backend.service.port` + +Optional: + +- `name` (String) Specifies the name of the port of the referenced service. +- `number` (Number) Specifies the numerical port of the referenced service. + + + + + +### Nested Schema for `spec.rule` + +Optional: + +- `host` (String) host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the "host" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + the IP in the Spec of the parent Ingress. + +2. The `:` delimiter is not respected because ports are not allowed. + Currently the port of an Ingress is implicitly :80 for http and + :443 for https. +Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue. + +host can be "precise" which is a domain name without the terminating dot of a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. "*.foo.com"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). Requests will be matched against the Host field in the following way: 1. If host is precise, the request matches this rule if the http host header is equal to Host. 2. If host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule. + +- `http` (Block List, Max: 1) http is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'. (see [below for nested schema](#nestedblock--spec--rule--http)) + + +### Nested Schema for `spec.rule.http` + +Required: + +- `path` (Block List, Min: 1) (see [below for nested schema](#nestedblock--spec--rule--http--path)) + + +### Nested Schema for `spec.rule.http.path` + +Optional: + +- `backend` (Block List, Max: 1) Backend defines the referenced service endpoint to which the traffic will be forwarded to. (see [below for nested schema](#nestedblock--spec--rule--http--path--backend)) +- `path` (String) path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value "Exact" or "Prefix". +- `path_type` (String) pathType determines the interpretation of the path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is + done on a path element by element basis. A path element refers is the + list of labels in the path split by the '/' separator. A request is a + match for path p if every p is an element-wise prefix of p of the + request path. Note that if the last element of the path is a substring + of the last element in request path, it is not a match (e.g. /foo/bar + matches /foo/bar/baz, but does not match /foo/barbaz). + +* ImplementationSpecific: Interpretation of the Path matching is up to + the IngressClass. Implementations can treat this as a separate PathType + or treat it identically to Prefix or Exact path types. +Implementations are required to support all path types. + + +### Nested Schema for `spec.rule.http.path.backend` + +Optional: + +- `resource` (Block List, Max: 1) Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. (see [below for nested schema](#nestedblock--spec--rule--http--path--backend--resource)) +- `service` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--rule--http--path--backend--service)) + + +### Nested Schema for `spec.rule.http.path.backend.resource` + +Required: + +- `api_group` (String) 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. +- `kind` (String) The kind of resource. +- `name` (String) The name of the User to bind to. + + + +### Nested Schema for `spec.rule.http.path.backend.service` + +Required: + +- `name` (String) Specifies the name of the referenced service. +- `port` (Block List, Min: 1, Max: 1) Specifies the port of the referenced service. (see [below for nested schema](#nestedblock--spec--rule--http--path--backend--service--port)) + + +### Nested Schema for `spec.rule.http.path.backend.service.port` + +Optional: + +- `name` (String) Specifies the name of the port of the referenced service. +- `number` (Number) Specifies the numerical port of the referenced service. + + + + + + + + +### Nested Schema for `spec.tls` + +Optional: + +- `hosts` (List of String) hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified. +- `secret_name` (String) secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the "Host" header is used for routing. + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) + + + +### Nested Schema for `status` + +Read-Only: + +- `load_balancer` (List of Object) (see [below for nested schema](#nestedobjatt--status--load_balancer)) + + +### Nested Schema for `status.load_balancer` + +Read-Only: + +- `ingress` (List of Object) (see [below for nested schema](#nestedobjatt--status--load_balancer--ingress)) + + +### Nested Schema for `status.load_balancer.ingress` + +Read-Only: + +- `hostname` (String) +- `ip` (String) + + + + + + ## Example Usage ```terraform @@ -193,118 +406,6 @@ output "load_balancer_ip" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard ingress's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Spec defines the behavior of a ingress. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `false`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the ingress that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `default_backend` - (Optional) DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller. See `backend` block attributes below. -* `rule` - (Optional) A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. See `rule` block attributes below. -* `tls` - (Optional) TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. See `tls` block attributes below. -* `ingress_class_name` - (Optional) The ingress class name references an IngressClass resource that contains additional configuration including the name of the controller that should implement the class. - -### `backend` - -#### Arguments - -* `resource` - (Optional) Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a `service.name` and `service.port` must not be specified. -* `service` - (Optional) Service references a Service as a Backend. - -### `service` - -#### Arguments - -* `name` - (Optional) Specifies the name of the referenced service. -* `port` - (Optional) Specifies the port of the referenced service. - -### `port` - -* `name` - (Optional) Name is the name of the port on the Service. -* `number` - (Optional) Number is the numerical port number (e.g. 80) on the Service. - -#### Arguments - -### `rule` - -#### Arguments - -* `host` - (Optional) Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the IP in the Spec of the parent Ingress. 2. The : delimiter is not respected because ports are not allowed. Currently the port of an Ingress is implicitly :80 for http and :443 for https. Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue. -* `http` - (Optional) http is a list of http selectors pointing to backends. In the example: http:///? -> backend where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'. See `http` block attributes below. - -#### `http` - -* `path` - (Required) Path array of path regex associated with a backend. Incoming urls matching the path are forwarded to the backend, see below for `path` block structure. - -#### `path` - -* `path` - (Required) A string or an extended POSIX regular expression as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. -* `path_type` - (Optional) PathType determines the interpretation of the Path matching. PathType can be one of the following values: `ImplementationSpecific`, `Exact`, or `Prefix`. See the [Kubernetes Ingress documentation](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types) for details. -* `backend` - (Required) Backend defines the referenced service endpoint to which the traffic will be forwarded to. - -### `tls` - -#### Arguments - -* `hosts` - (Optional) Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified. -* `secret_name` - (Optional) SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing. - -## Attributes - -### `status` - -* `status` - Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -#### `load_balancer` - -* LoadBalancer contains the current status of the load-balancer, if one is present. - -##### `ingress` - -* `ingress` - Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - -###### Attributes - -* `ip` - IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers). -* `hostname` - Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers). - -## Timeouts - -The following [Timeout](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts) configuration options are available for the `kubernetes_ingress_v1` resource: - -* `create` - ingress load balancer creation timeout (default `20 minutes`). -* `delete` - ingress load balancer deletion timeout (default `20 minutes`). - ## Import Ingress can be imported using its namespace and name: diff --git a/docs/resources/job.md b/docs/resources/job.md index 66ed010814..79ae3158d0 100644 --- a/docs/resources/job.md +++ b/docs/resources/job.md @@ -13,6 +13,2280 @@ A simple case is to create one Job object in order to reliably run one Pod to co You can also use a Job to run multiple Pods in parallel. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard job's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec of the job owned by the cluster (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_completion` (Boolean) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the job that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the job. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the job, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the job must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this job that can be used by clients to determine when job has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this job. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `template` (Block List, Min: 1, Max: 1) Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ (see [below for nested schema](#nestedblock--spec--template)) + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `backoff_limit` (Number) Specifies the number of retries before marking this job failed. Defaults to 6 +- `completion_mode` (String) Specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. More info: https://kubernetes.io/docs/concepts/workloads/controllers/job/#completion-mode +- `completions` (Number) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +- `manual_selector` (Boolean) Controls generation of pod labels and pod selectors. Leave unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md +- `parallelism` (Number) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +- `pod_failure_policy` (Block List, Max: 1) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ (see [below for nested schema](#nestedblock--spec--pod_failure_policy)) +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--selector)) +- `ttl_seconds_after_finished` (String) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. + + +### Nested Schema for `spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard job's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--template--metadata)) + +Optional: + +- `spec` (Block List, Max: 1) Spec of the pods owned by the job (see [below for nested schema](#nestedblock--spec--template--spec)) + + +### Nested Schema for `spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the job that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the job. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the job, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this job that can be used by clients to determine when job has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this job. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume)) + + +### Nested Schema for `spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.init_container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.init_container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.init_container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.init_container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.os` + +Required: + +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. + + + +### Nested Schema for `spec.template.spec.readiness_gate` + +Required: + +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. + + + +### Nested Schema for `spec.template.spec.security_context` + +Optional: + +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--windows_options)) + + +### Nested Schema for `spec.template.spec.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + +### Nested Schema for `spec.template.spec.security_context.sysctl` + +Required: + +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. + + + +### Nested Schema for `spec.template.spec.security_context.windows_options` + +Optional: + +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. + + + + +### Nested Schema for `spec.template.spec.toleration` + +Optional: + +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + + + +### Nested Schema for `spec.template.spec.topology_spread_constraint` + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume` + +Optional: + +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--vsphere_volume)) + + +### Nested Schema for `spec.template.spec.volume.aws_elastic_block_store` + +Required: + +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + +### Nested Schema for `spec.template.spec.volume.azure_disk` + +Required: + +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage + +Optional: + +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.azure_file` + +Required: + +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name + +Optional: + +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. + + + +### Nested Schema for `spec.template.spec.volume.ceph_fs` + +Required: + +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +Optional: + +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + +### Nested Schema for `spec.template.spec.volume.ceph_fs.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.cinder` + +Required: + +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +Optional: + +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + +### Nested Schema for `spec.template.spec.volume.config_map` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.csi` + +Required: + +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi + +Optional: + +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. + + +### Nested Schema for `spec.template.spec.volume.csi.node_publish_secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.downward_api` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items` + +Required: + +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' + +Optional: + +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.empty_dir` + +Optional: + +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice + + + +### Nested Schema for `spec.template.spec.volume.iscsi` + +Required: + +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). + +Optional: + +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. + + + +### Nested Schema for `spec.template.spec.volume.local` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local + + + +### Nested Schema for `spec.template.spec.volume.nfs` + +Required: + +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + +Optional: + +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + + + +### Nested Schema for `spec.template.spec.volume.persistent_volume_claim` + +Optional: + +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. + + + +### Nested Schema for `spec.template.spec.volume.photon_persistent_disk` + +Required: + +- `pd_id` (String) ID that identifies Photon Controller persistent disk + +Optional: + +- `fs_type` (String) 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. + + + +### Nested Schema for `spec.template.spec.volume.projected` + +Required: + +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources)) + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. + + +### Nested Schema for `spec.template.spec.volume.projected.sources` + +Optional: + +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--service_account_token)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map` + +Optional: + +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api` + +Optional: + +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items` + +Required: + +- `path` (String) 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 '..' + +Optional: + +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret` + +Optional: + +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + +### Nested Schema for `spec.pod_failure_policy` + +Required: + +- `rule` (Block List, Min: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--pod_failure_policy--rule)) + + +### Nested Schema for `spec.pod_failure_policy.rule` + +Optional: + +- `action` (String) +- `on_exit_codes` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--pod_failure_policy--rule--on_exit_codes)) +- `on_pod_condition` (Block List) (see [below for nested schema](#nestedblock--spec--pod_failure_policy--rule--on_pod_condition)) + + +### Nested Schema for `spec.pod_failure_policy.rule.on_exit_codes` + +Required: + +- `values` (List of Number) + +Optional: + +- `container_name` (String) +- `operator` (String) + + + +### Nested Schema for `spec.pod_failure_policy.rule.on_pod_condition` + +Optional: + +- `status` (String) +- `type` (String) + + + + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `update` (String) + + + + ## Example Usage - No waiting ```terraform @@ -67,104 +2341,6 @@ resource "kubernetes_job" "demo" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Specification of the desired behavior of a job. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_completion` - (Optional) If `true` blocks job `create` or `update` until the status of the job has a `Complete` or `Failed` condition. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `active_deadline_seconds` - (Optional) Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. -* `backoff_limit` - (Optional) Specifies the number of retries before marking this job failed. Defaults to 6 -* `completions` - (Optional) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `completion_mode` - (Optional) Specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/job/#completion-mode). -* `pod_failure_policy` - (Optional) Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure. -* `manual_selector` - (Optional) Controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector -* `parallelism` - (Optional) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when `((.spec.completions - .status.successful) < .spec.parallelism)`, i.e. when the work left to do is less than max parallelism. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `selector` - (Optional) A label query over pods that should match the pod count. Normally, the system sets this field for you. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors -* `template` - (Optional) Describes the pod that will be created when executing a job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `ttl_seconds_after_finished` - (Optional) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. - -### `pod_failure_policy` - -#### Arguments - -* `rule` - (Required) A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. - -### `rule` - -#### Arguments - -* `action` - (Optional) Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. -* `on_exit_codes` - (Optional) Represents the requirement on the container exit codes. -* `on_pod_condition` - (Optional) Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. - -### `on_exit_codes` - -#### Arguments - -* `container_name` - (Optional) Restricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template. -* `operator` - (Optional) Represents the relationship between the container exit code(s) and the specified values. -* `values` - (Required) Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. - -### `on_pod_condition` - -#### Arguments - -* `status` - (Optional) Specifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True. -* `type` - (Optional) Specifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type. - -### `selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. - -### `template` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/language/resources/syntax.html#operation-timeouts) configuration options are available for the `kubernetes_job` resource when used with `wait_for_completion = true`: - -* `create` - (Default `1m`) Used for creating a new job and waiting for a successful job completion. -* `update` - (Default `1m`) Used for updating an existing job and waiting for a successful job completion. - Note: - Kubernetes provider will treat update operations that change the Job spec resulting in the job re-run as "# forces replacement". In such cases, the `create` timeout value is used for both Create and Update operations. diff --git a/docs/resources/job_v1.md b/docs/resources/job_v1.md index f22d7d00d8..70f52d1336 100644 --- a/docs/resources/job_v1.md +++ b/docs/resources/job_v1.md @@ -7,11 +7,2281 @@ description: |- # kubernetes_job_v1 -A Job creates one or more Pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. +A Job creates one or more Pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot. You can also use a Job to run multiple Pods in parallel. + + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard job's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec of the job owned by the cluster (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_completion` (Boolean) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the job that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the job. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the job, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the job must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this job that can be used by clients to determine when job has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this job. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `template` (Block List, Min: 1, Max: 1) Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ (see [below for nested schema](#nestedblock--spec--template)) + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `backoff_limit` (Number) Specifies the number of retries before marking this job failed. Defaults to 6 +- `completion_mode` (String) Specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. More info: https://kubernetes.io/docs/concepts/workloads/controllers/job/#completion-mode +- `completions` (Number) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +- `manual_selector` (Boolean) Controls generation of pod labels and pod selectors. Leave unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md +- `parallelism` (Number) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +- `pod_failure_policy` (Block List, Max: 1) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ (see [below for nested schema](#nestedblock--spec--pod_failure_policy)) +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--selector)) +- `ttl_seconds_after_finished` (String) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. + + +### Nested Schema for `spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard job's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--template--metadata)) + +Optional: + +- `spec` (Block List, Max: 1) Spec of the pods owned by the job (see [below for nested schema](#nestedblock--spec--template--spec)) + + +### Nested Schema for `spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the job that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the job. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the job, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this job that can be used by clients to determine when job has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this job. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume)) + + +### Nested Schema for `spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.init_container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.init_container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.init_container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.init_container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.os` + +Required: + +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. + + + +### Nested Schema for `spec.template.spec.readiness_gate` + +Required: + +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. + + + +### Nested Schema for `spec.template.spec.security_context` + +Optional: + +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--windows_options)) + + +### Nested Schema for `spec.template.spec.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + +### Nested Schema for `spec.template.spec.security_context.sysctl` + +Required: + +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. + + + +### Nested Schema for `spec.template.spec.security_context.windows_options` + +Optional: + +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. + + + + +### Nested Schema for `spec.template.spec.toleration` + +Optional: + +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + + + +### Nested Schema for `spec.template.spec.topology_spread_constraint` + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume` + +Optional: + +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--vsphere_volume)) + + +### Nested Schema for `spec.template.spec.volume.aws_elastic_block_store` + +Required: + +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + +### Nested Schema for `spec.template.spec.volume.azure_disk` + +Required: + +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage + +Optional: + +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.azure_file` + +Required: + +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name + +Optional: + +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. + + + +### Nested Schema for `spec.template.spec.volume.ceph_fs` + +Required: + +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +Optional: + +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + +### Nested Schema for `spec.template.spec.volume.ceph_fs.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.cinder` + +Required: + +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +Optional: + +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + +### Nested Schema for `spec.template.spec.volume.config_map` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.csi` + +Required: + +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi + +Optional: + +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. + + +### Nested Schema for `spec.template.spec.volume.csi.node_publish_secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.downward_api` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items` + +Required: + +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' + +Optional: + +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.empty_dir` + +Optional: + +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice + + + +### Nested Schema for `spec.template.spec.volume.iscsi` + +Required: + +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). + +Optional: + +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. + + + +### Nested Schema for `spec.template.spec.volume.local` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local + + + +### Nested Schema for `spec.template.spec.volume.nfs` + +Required: + +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + +Optional: + +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + + + +### Nested Schema for `spec.template.spec.volume.persistent_volume_claim` + +Optional: + +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. + + + +### Nested Schema for `spec.template.spec.volume.photon_persistent_disk` + +Required: + +- `pd_id` (String) ID that identifies Photon Controller persistent disk + +Optional: + +- `fs_type` (String) 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. + + + +### Nested Schema for `spec.template.spec.volume.projected` + +Required: + +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources)) + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. + + +### Nested Schema for `spec.template.spec.volume.projected.sources` + +Optional: + +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--service_account_token)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map` + +Optional: + +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api` + +Optional: + +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items` + +Required: + +- `path` (String) 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 '..' + +Optional: + +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret` + +Optional: + +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + +### Nested Schema for `spec.pod_failure_policy` + +Required: + +- `rule` (Block List, Min: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--pod_failure_policy--rule)) + + +### Nested Schema for `spec.pod_failure_policy.rule` + +Optional: + +- `action` (String) +- `on_exit_codes` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--pod_failure_policy--rule--on_exit_codes)) +- `on_pod_condition` (Block List) (see [below for nested schema](#nestedblock--spec--pod_failure_policy--rule--on_pod_condition)) + + +### Nested Schema for `spec.pod_failure_policy.rule.on_exit_codes` + +Required: + +- `values` (List of Number) + +Optional: + +- `container_name` (String) +- `operator` (String) + + + +### Nested Schema for `spec.pod_failure_policy.rule.on_pod_condition` + +Optional: + +- `status` (String) +- `type` (String) + + + + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `update` (String) + -A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot. -You can also use a Job to run multiple Pods in parallel. ## Example Usage - No waiting @@ -67,104 +2337,6 @@ resource "kubernetes_job_v1" "demo" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Specification of the desired behavior of a job. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_completion` - (Optional) If `true` blocks job `create` or `update` until the status of the job has a `Complete` or `Failed` condition. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `active_deadline_seconds` - (Optional) Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. -* `backoff_limit` - (Optional) Specifies the number of retries before marking this job failed. Defaults to 6 -* `completions` - (Optional) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `completion_mode` - (Optional) Specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/job/#completion-mode). -* `manual_selector` - (Optional) Controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector -* `pod_failure_policy` - (Optional) Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure. -* `parallelism` - (Optional) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when `((.spec.completions - .status.successful) < .spec.parallelism)`, i.e. when the work left to do is less than max parallelism. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `selector` - (Optional) A label query over pods that should match the pod count. Normally, the system sets this field for you. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors -* `template` - (Optional) Describes the pod that will be created when executing a job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `ttl_seconds_after_finished` - (Optional) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. - -### `pod_failure_policy` - -#### Arguments - -* `rule` - (Required) A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. - -### `rule` - -#### Arguments - -* `action` - (Optional) Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. -* `on_exit_codes` - (Optional) Represents the requirement on the container exit codes. -* `on_pod_condition` - (Optional) Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. - -### `on_exit_codes` - -#### Arguments - -* `container_name` - (Optional) Restricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template. -* `operator` - (Optional) Represents the relationship between the container exit code(s) and the specified values. -* `values` - (Required) Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. - -### `on_pod_condition` - -#### Arguments - -* `status` - (Optional) Specifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True. -* `type` - (Optional) Specifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type. - -### `selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. - -### `template` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/language/resources/syntax.html#operation-timeouts) configuration options are available for the `kubernetes_job_v1` resource when used with `wait_for_completion = true`: - -* `create` - (Default `1m`) Used for creating a new job and waiting for a successful job completion. -* `update` - (Default `1m`) Used for updating an existing job and waiting for a successful job completion. - Note: - Kubernetes provider will treat update operations that change the Job spec resulting in the job re-run as "# forces replacement". In such cases, the `create` timeout value is used for both Create and Update operations. diff --git a/docs/resources/labels.md b/docs/resources/labels.md index 7524a774a8..cf534f9f8e 100644 --- a/docs/resources/labels.md +++ b/docs/resources/labels.md @@ -9,6 +9,39 @@ description: |- This resource allows Terraform to manage the labels for a resource that already exists. This resource uses [field management](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) to manage only the labels that are defined in the Terraform configuration. Existing labels not specified in the configuration will be ignored. If a label specified in the config and is already managed by another client it will cause a conflict which can be overridden by setting `force` to true. + +## Schema + +### Required + +- `api_version` (String) The apiVersion of the resource to label. +- `kind` (String) The kind of the resource to label. +- `labels` (Map of String) A map of labels to apply to the resource. +- `metadata` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `field_manager` (String) Set the name of the field manager for the specified labels. +- `force` (Boolean) Force overwriting labels that were created or edited outside of Terraform. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Required: + +- `name` (String) The name of the resource. + +Optional: + +- `namespace` (String) The namespace of the resource. + + + + ## Example Usage ```terraform @@ -24,26 +57,6 @@ resource "kubernetes_labels" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `api_version` - (Required) The apiVersion of the resource to be labelled. -* `kind` - (Required) The kind of the resource to be labelled. -* `metadata` - (Required) Standard metadata of the resource to be labelled. -* `labels` - (Required) A map of labels to apply to the resource. -* `force` - (Optional) Force management of labels if there is a conflict. -* `field_manager` - (Optional) The name of the [field manager](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management). Defaults to `Terraform`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `name` - (Required) Name of the resource to be labelled. -* `namespace` - (Optional) Namespace of the resource to be labelled. - ## Import This resource does not support the `import` command. As this resource operates on Kubernetes resources that already exist, creating the resource is equivalent to importing it. diff --git a/docs/resources/limit_range.md b/docs/resources/limit_range.md index f72d4d3607..6b48a56ee0 100644 --- a/docs/resources/limit_range.md +++ b/docs/resources/limit_range.md @@ -11,6 +11,62 @@ Limit Range sets resource usage limits (e.g. memory, cpu, storage) for supported Read more in [the official docs](https://kubernetes.io/docs/concepts/policy/limit-range/). + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard limit range's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `spec` (Block List, Max: 1) Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the limit range that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the limit range. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the limit range, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the limit range must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this limit range that can be used by clients to determine when limit range has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this limit range. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Optional: + +- `limit` (Block List) Limits is the list of objects that are enforced. (see [below for nested schema](#nestedblock--spec--limit)) + + +### Nested Schema for `spec.limit` + +Optional: + +- `default` (Map of String) Default resource requirement limit value by resource name if resource limit is omitted. +- `default_request` (Map of String) The default resource requirement request value by resource name if resource request is omitted. +- `max` (Map of String) Max usage constraints on this kind by resource name. +- `max_limit_request_ratio` (Map of String) The named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. +- `min` (Map of String) Min usage constraints on this kind by resource name. +- `type` (String) Type of resource that this limit applies to. + + + + + ## Example Usage ```terraform @@ -43,54 +99,6 @@ resource "kubernetes_limit_range" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard limit range's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Optional) Spec defines the limits enforced. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `spec` - -#### Arguments - -* `limit` - (Optional) The list of limits that are enforced. - -### `limit` - -#### Arguments - -* `default` - (Optional) Default resource requirement limit value by resource name if resource limit is omitted. -* `default_request` - (Optional) The default resource requirement request value by resource name if resource request is omitted. -* `max` - (Optional) Max usage constraints on this kind by resource name. -* `max_limit_request_ratio` - (Optional) The named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. -* `min` - (Optional) Min usage constraints on this kind by resource name. -* `type` - (Optional) Type of resource that this limit applies to. e.g. `Pod`, `Container` or `PersistentVolumeClaim` - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the limit range that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the limit range. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the limit range, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the limit range must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this limit range that can be used by clients to determine when limit range has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this limit range. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import Limit Range can be imported using its namespace and name, e.g. diff --git a/docs/resources/limit_range_v1.md b/docs/resources/limit_range_v1.md index d7af2a2b4a..b78db0fdc7 100644 --- a/docs/resources/limit_range_v1.md +++ b/docs/resources/limit_range_v1.md @@ -7,9 +7,63 @@ description: |- # kubernetes_limit_range_v1 -Limit Range sets resource usage limits (e.g. memory, cpu, storage) for supported kinds of resources in a namespace. +Limit Range sets resource usage limits (e.g. memory, cpu, storage) for supported kinds of resources in a namespace. Read more in [the official docs](https://kubernetes.io/docs/concepts/policy/limit-range/). + + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard limit range's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `spec` (Block List, Max: 1) Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the limit range that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the limit range. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the limit range, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the limit range must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this limit range that can be used by clients to determine when limit range has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this limit range. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Optional: + +- `limit` (Block List) Limits is the list of objects that are enforced. (see [below for nested schema](#nestedblock--spec--limit)) + + +### Nested Schema for `spec.limit` + +Optional: + +- `default` (Map of String) Default resource requirement limit value by resource name if resource limit is omitted. +- `default_request` (Map of String) The default resource requirement request value by resource name if resource request is omitted. +- `max` (Map of String) Max usage constraints on this kind by resource name. +- `max_limit_request_ratio` (Map of String) The named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. +- `min` (Map of String) Min usage constraints on this kind by resource name. +- `type` (String) Type of resource that this limit applies to. + + + -Read more in [the official docs](https://kubernetes.io/docs/concepts/policy/limit-range/). ## Example Usage @@ -43,54 +97,6 @@ resource "kubernetes_limit_range_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard limit range's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Optional) Spec defines the limits enforced. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `spec` - -#### Arguments - -* `limit` - (Optional) The list of limits that are enforced. - -### `limit` - -#### Arguments - -* `default` - (Optional) Default resource requirement limit value by resource name if resource limit is omitted. -* `default_request` - (Optional) The default resource requirement request value by resource name if resource request is omitted. -* `max` - (Optional) Max usage constraints on this kind by resource name. -* `max_limit_request_ratio` - (Optional) The named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. -* `min` - (Optional) Min usage constraints on this kind by resource name. -* `type` - (Optional) Type of resource that this limit applies to. e.g. `Pod`, `Container` or `PersistentVolumeClaim` - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the limit range that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the limit range. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the limit range, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the limit range must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this limit range that can be used by clients to determine when limit range has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this limit range. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import Limit Range can be imported using its namespace and name, e.g. diff --git a/docs/resources/manifest.md b/docs/resources/manifest.md index 5064cfe4af..0f69d902e4 100644 --- a/docs/resources/manifest.md +++ b/docs/resources/manifest.md @@ -13,6 +13,70 @@ Once applied, the `object` attribute contains the state of the resource as retur ~> A minimum Terraform version of 0.14.8 is required to use this resource. + +## Schema + +### Required + +- `manifest` (Dynamic) A Kubernetes manifest describing the desired state of the resource in HCL format. + +### Optional + +- `computed_fields` (List of String) List of manifest fields whose values can be altered by the API server during 'apply'. Defaults to: ["metadata.annotations", "metadata.labels"] +- `field_manager` (Block List, Max: 1) Configure field manager options. (see [below for nested schema](#nestedblock--field_manager)) +- `object` (Dynamic) The resulting resource state, as returned by the API server after applying the desired state from `manifest`. +- `timeouts` (Block List, Max: 1) (see [below for nested schema](#nestedblock--timeouts)) +- `wait` (Block List, Max: 1) Configure waiter options. (see [below for nested schema](#nestedblock--wait)) +- `wait_for` (Object, Deprecated) A map of attribute paths and desired patterns to be matched. After each apply the provider will wait for all attributes listed here to reach a value that matches the desired pattern. (see [below for nested schema](#nestedatt--wait_for)) + + +### Nested Schema for `field_manager` + +Optional: + +- `force_conflicts` (Boolean) Force changes against conflicts. +- `name` (String) The name to use for the field manager when creating and updating the resource. + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) Timeout for the create operation. +- `delete` (String) Timeout for the delete operation. +- `update` (String) Timeout for the update operation. + + + +### Nested Schema for `wait` + +Optional: + +- `condition` (Block List) (see [below for nested schema](#nestedblock--wait--condition)) +- `fields` (Map of String) A map of paths to fields to wait for a specific field value. +- `rollout` (Boolean) Wait for rollout to complete on resources that support `kubectl rollout status`. + + +### Nested Schema for `wait.condition` + +Optional: + +- `status` (String) The condition status. +- `type` (String) The type of condition. + + + + +### Nested Schema for `wait_for` + +Optional: + +- `fields` (Map of String) + + + + ### Before you use this resource - This resource requires API access during planning time. This means the cluster has to be accessible at plan time and thus cannot be created in the same apply operation. We recommend only using this resource for custom resources or resources not yet fully supported by the provider. @@ -213,25 +277,6 @@ resource "kubernetes_manifest" "test-ns" { The syntax for the field paths is the same as the one used in the `wait` block. -## Argument Reference - -The following arguments are supported: - -- `computed_fields` - (Optional) List of paths of fields to be handled as "computed". The user-configured value for the field will be overridden by any different value returned by the API after apply. -- `manifest` (Required) An object Kubernetes manifest describing the desired state of the resource in HCL format. -- `object` (Optional) The resulting resource state, as returned by the API server after applying the desired state from `manifest`. -- `wait` (Optional) An object which allows you configure the provider to wait for specific fields to reach a desired value or certain conditions to be met. See below for schema. -- `wait_for` (Optional, Deprecated) An object which allows you configure the provider to wait for certain conditions to be met. See below for schema. **DEPRECATED: use `wait` block**. -- `field_manager` (Optional) Configure field manager options. See below. - -### `wait` - -#### Arguments - -- `rollout` (Optional) When set to `true` will wait for the resource to roll out, equivalent to `kubectl rollout status`. -- `condition` (Optional) A set of condition to wait for. You can specify multiple `condition` blocks and it will wait for all of them. -- `fields` (Optional) A map of field paths and a corresponding regular expression with a pattern to wait for. The provider will wait until the field's value matches the regular expression. Use `*` for any value. - A field path is a string that describes the fully qualified address of a field within the resource, including its parent fields all the way up to "object". The syntax of a path string follows the rules below: - Fields of objects are addressed with `.` @@ -254,20 +299,3 @@ A field path is a string that describes the fully qualified address of a field w > type(kubernetes_manifest.my-secret.object.data) map(string) ``` - -### `wait_for` (deprecated, use `wait`) - -#### Arguments - -- `fields` (Optional) A map of fields and a corresponding regular expression with a pattern to wait for. The provider will wait until the field matches the regular expression. Use `*` for any value. - -### `field_manager` - -#### Arguments - -- `name` (Optional) The name of the field manager to use when applying the resource. Defaults to `Terraform`. -- `force_conflicts` (Optional) Forcibly override any field manager conflicts when applying the resource. Defaults to `false`. - -### `timeouts` - -See [Operation Timeouts](https://www.terraform.io/docs/language/resources/syntax.html#operation-timeouts) diff --git a/docs/resources/mutating_webhook_configuration.md b/docs/resources/mutating_webhook_configuration.md index 136b5a4b3e..fceb9ebd15 100644 --- a/docs/resources/mutating_webhook_configuration.md +++ b/docs/resources/mutating_webhook_configuration.md @@ -9,6 +9,193 @@ description: |- Mutating Webhook Configuration configures a [mutating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks). + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard mutating webhook configuration's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `webhook` (Block List, Min: 1) Webhooks is a list of webhooks and the affected resources and operations. (see [below for nested schema](#nestedblock--webhook)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the mutating webhook configuration that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the mutating webhook configuration. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the mutating webhook configuration, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this mutating webhook configuration that can be used by clients to determine when mutating webhook configuration has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this mutating webhook configuration. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `webhook` + +Required: + +- `client_config` (Block List, Min: 1, Max: 1) ClientConfig defines how to communicate with the hook. Required (see [below for nested schema](#nestedblock--webhook--client_config)) +- `name` (String) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. Required. + +Optional: + +- `admission_review_versions` (List of String) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. +- `failure_policy` (String) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail. +- `match_policy` (String) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". + +- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + +- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + +Defaults to "Equivalent" + +- `namespace_selector` (Block List, Max: 1) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. + +For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { + "matchExpressions": [ + { + "key": "runlevel", + "operator": "NotIn", + "values": [ + "0", + "1" + ] + } + ] +} + +If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { + "matchExpressions": [ + { + "key": "environment", + "operator": "In", + "values": [ + "prod", + "staging" + ] + } + ] +} + +See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors. + +Default to the empty LabelSelector, which matches everything. (see [below for nested schema](#nestedblock--webhook--namespace_selector)) + +- `object_selector` (Block List, Max: 1) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. (see [below for nested schema](#nestedblock--webhook--object_selector)) +- `reinvocation_policy` (String) reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded". + +Never: the webhook will not be called more than once in a single admission evaluation. + +IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead. + +Defaults to "Never". + +- `rule` (Block List) Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. (see [below for nested schema](#nestedblock--webhook--rule)) +- `side_effects` (String) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. +- `timeout_seconds` (Number) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. + + +### Nested Schema for `webhook.client_config` + +Optional: + +- `ca_bundle` (String) `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. +- `service` (Block List, Max: 1) `service` is a reference to the service for this webhook. Either `service` or `url` must be specified. + +If the webhook is running within the cluster, then you should use `service`. (see [below for nested schema](#nestedblock--webhook--client_config--service)) + +- `url` (String) `url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. + +The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. + +Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. + +The scheme must be "https"; the URL must begin with "https://". + +A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. + +Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. + + +### Nested Schema for `webhook.client_config.service` + +Required: + +- `name` (String) `name` is the name of the service. Required +- `namespace` (String) `namespace` is the namespace of the service. Required + +Optional: + +- `path` (String) `path` is an optional URL path which will be sent in any request to this service. +- `port` (Number) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). + + + + +### Nested Schema for `webhook.namespace_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--webhook--namespace_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `webhook.namespace_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `webhook.object_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--webhook--object_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `webhook.object_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `webhook.rule` + +Required: + +- `api_groups` (List of String) +- `api_versions` (List of String) +- `operations` (List of String) Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. +- `resources` (List of String) + +Optional: + +- `scope` (String) + + + + + ## Example Usage ```terraform @@ -47,81 +234,6 @@ resource "kubernetes_mutating_webhook_configuration" "example" { The provider supports clusters running either `v1` or `v1beta1` of the Admission Registration API. -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Mutating Webhook Configuration metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `webhook` - (Required) A list of webhooks and the affected resources and operations. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Mutating Webhook Configuration that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Mutating Webhook Configuration. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Mutating Webhook Configuration, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Mutating Webhook Configuration that can be used by clients to determine when Mutating Webhook Configuration has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Mutating Webhook Configuration. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `webhook` - -#### Arguments - -* `admission_review_versions` - (Optional) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list are supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. -* `client_config` - (Required) ClientConfig defines how to communicate with the hook. -* `failure_policy` - (Optional) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - Allowed values are "Ignore" or "Fail". Defaults to "Fail". -* `match_policy` - (Optional) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to "Equivalent" -* `name` - (Required) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. -* `namespace_selector` - (Optional) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator": "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "environment", "operator": "In", "values": [ "prod", "staging" ] } ] } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. Default to the empty LabelSelector, which matches everything. -* `object_selector` - (Optional) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. -* `reinvocation_policy` - (Optional) reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded". Never: the webhook will not be called more than once in a single admission evaluation. IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: *the number of additional invocations is not guaranteed to be exactly one.* if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. *webhooks that use this option may be reordered to minimize the number of additional invocations.* to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead. Defaults to "Never". -* `rule` - (Optional) Describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches *any* Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. -* `side_effects` - (Required) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. -* `timeout_seconds` - (Optional) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. - -### `client_config` - -#### Arguments - -* `ca_bundle` - (Optional) A PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. -* `service` - (Optional) A reference to the service for this webhook. Either `service` or `url` must be specified. If the webhook is running within the cluster, then you should use `service`. -* `url` - (Optional) Gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. - -~> Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be "https"; the URL must begin with "https://". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. - -### `service` - -#### Arguments - -* `name` - (Required) The name of the service. -* `namespace` - (Required) The namespace of the service. -* `path` - (Optional) The URL path which will be sent in any request to this service. -* `port` - (Optional) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). - -### `rule` - -#### Arguments - -* `api_groups` - (Required) The API groups the resources belong to. '\*' is all groups. If '\*' is present, the length of the list must be one. -* `api_versions` - (Required) The API versions the resources belong to. '\*' is all versions. If '\*' is present, the length of the list must be one. -* `operations` - (Required) The operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '\*' is present, the length of the list must be one. -* `resources` - (Required) A list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '\*' means all resources, but not subresources. 'pods/\*' means all subresources of pods. '\*/scale' means all scale subresources. '\*/\*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. -* `scope` - (Optional) Specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". - ## Import Mutating Webhook Configuration can be imported using the name, e.g. diff --git a/docs/resources/mutating_webhook_configuration_v1.md b/docs/resources/mutating_webhook_configuration_v1.md index a4bd97f6c9..8a38199baa 100644 --- a/docs/resources/mutating_webhook_configuration_v1.md +++ b/docs/resources/mutating_webhook_configuration_v1.md @@ -9,6 +9,193 @@ description: |- Mutating Webhook Configuration configures a [mutating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks). + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard mutating webhook configuration's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `webhook` (Block List, Min: 1) Webhooks is a list of webhooks and the affected resources and operations. (see [below for nested schema](#nestedblock--webhook)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the mutating webhook configuration that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the mutating webhook configuration. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the mutating webhook configuration, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this mutating webhook configuration that can be used by clients to determine when mutating webhook configuration has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this mutating webhook configuration. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `webhook` + +Required: + +- `client_config` (Block List, Min: 1, Max: 1) ClientConfig defines how to communicate with the hook. Required (see [below for nested schema](#nestedblock--webhook--client_config)) +- `name` (String) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. Required. + +Optional: + +- `admission_review_versions` (List of String) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. +- `failure_policy` (String) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail. +- `match_policy` (String) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". + +- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + +- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + +Defaults to "Equivalent" + +- `namespace_selector` (Block List, Max: 1) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. + +For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { + "matchExpressions": [ + { + "key": "runlevel", + "operator": "NotIn", + "values": [ + "0", + "1" + ] + } + ] +} + +If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { + "matchExpressions": [ + { + "key": "environment", + "operator": "In", + "values": [ + "prod", + "staging" + ] + } + ] +} + +See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors. + +Default to the empty LabelSelector, which matches everything. (see [below for nested schema](#nestedblock--webhook--namespace_selector)) + +- `object_selector` (Block List, Max: 1) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. (see [below for nested schema](#nestedblock--webhook--object_selector)) +- `reinvocation_policy` (String) reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded". + +Never: the webhook will not be called more than once in a single admission evaluation. + +IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead. + +Defaults to "Never". + +- `rule` (Block List) Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. (see [below for nested schema](#nestedblock--webhook--rule)) +- `side_effects` (String) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. +- `timeout_seconds` (Number) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. + + +### Nested Schema for `webhook.client_config` + +Optional: + +- `ca_bundle` (String) `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. +- `service` (Block List, Max: 1) `service` is a reference to the service for this webhook. Either `service` or `url` must be specified. + +If the webhook is running within the cluster, then you should use `service`. (see [below for nested schema](#nestedblock--webhook--client_config--service)) + +- `url` (String) `url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. + +The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. + +Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. + +The scheme must be "https"; the URL must begin with "https://". + +A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. + +Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. + + +### Nested Schema for `webhook.client_config.service` + +Required: + +- `name` (String) `name` is the name of the service. Required +- `namespace` (String) `namespace` is the namespace of the service. Required + +Optional: + +- `path` (String) `path` is an optional URL path which will be sent in any request to this service. +- `port` (Number) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). + + + + +### Nested Schema for `webhook.namespace_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--webhook--namespace_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `webhook.namespace_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `webhook.object_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--webhook--object_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `webhook.object_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `webhook.rule` + +Required: + +- `api_groups` (List of String) +- `api_versions` (List of String) +- `operations` (List of String) Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. +- `resources` (List of String) + +Optional: + +- `scope` (String) + + + + + ## Example Usage ```terraform @@ -47,81 +234,6 @@ resource "kubernetes_mutating_webhook_configuration_v1" "example" { The provider supports clusters running either `v1` or `v1beta1` of the Admission Registration API. -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Mutating Webhook Configuration metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `webhook` - (Required) A list of webhooks and the affected resources and operations. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Mutating Webhook Configuration that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Mutating Webhook Configuration. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Mutating Webhook Configuration, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Mutating Webhook Configuration that can be used by clients to determine when Mutating Webhook Configuration has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Mutating Webhook Configuration. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `webhook` - -#### Arguments - -* `admission_review_versions` - (Optional) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list are supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. -* `client_config` - (Required) ClientConfig defines how to communicate with the hook. -* `failure_policy` - (Optional) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - Allowed values are "Ignore" or "Fail". Defaults to "Fail". -* `match_policy` - (Optional) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to "Equivalent" -* `name` - (Required) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. -* `namespace_selector` - (Optional) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator": "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "environment", "operator": "In", "values": [ "prod", "staging" ] } ] } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. Default to the empty LabelSelector, which matches everything. -* `object_selector` - (Optional) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. -* `reinvocation_policy` - (Optional) reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded". Never: the webhook will not be called more than once in a single admission evaluation. IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: *the number of additional invocations is not guaranteed to be exactly one.* if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. *webhooks that use this option may be reordered to minimize the number of additional invocations.* to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead. Defaults to "Never". -* `rule` - (Optional) Describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches *any* Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. -* `side_effects` - (Required) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. -* `timeout_seconds` - (Optional) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. - -### `client_config` - -#### Arguments - -* `ca_bundle` - (Optional) A PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. -* `service` - (Optional) A reference to the service for this webhook. Either `service` or `url` must be specified. If the webhook is running within the cluster, then you should use `service`. -* `url` - (Optional) Gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. - -~> Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be "https"; the URL must begin with "https://". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. - -### `service` - -#### Arguments - -* `name` - (Required) The name of the service. -* `namespace` - (Required) The namespace of the service. -* `path` - (Optional) The URL path which will be sent in any request to this service. -* `port` - (Optional) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). - -### `rule` - -#### Arguments - -* `api_groups` - (Required) The API groups the resources belong to. '\*' is all groups. If '\*' is present, the length of the list must be one. -* `api_versions` - (Required) The API versions the resources belong to. '\*' is all versions. If '\*' is present, the length of the list must be one. -* `operations` - (Required) The operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '\*' is present, the length of the list must be one. -* `resources` - (Required) A list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '\*' means all resources, but not subresources. 'pods/\*' means all subresources of pods. '\*/scale' means all scale subresources. '\*/\*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. -* `scope` - (Optional) Specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". - ## Import Mutating Webhook Configuration can be imported using the name, e.g. diff --git a/docs/resources/namespace.md b/docs/resources/namespace.md index 15469cb2a3..c318afb382 100644 --- a/docs/resources/namespace.md +++ b/docs/resources/namespace.md @@ -5,10 +5,53 @@ description: |- Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces. --- -# kubernetes_namespace +# kubernetes_namespace Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces. Read more about namespaces at [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/). + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard namespace's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_default_service_account` (Boolean) Terraform will wait for the default service account to be created. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the namespace that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the namespace. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the namespace, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this namespace that can be used by clients to determine when namespace has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this namespace. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `timeouts` + +Optional: + +- `delete` (String) + + + + ## Example Usage ```terraform @@ -27,45 +70,12 @@ resource "kubernetes_namespace" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard namespace's [metadata](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - ### Timeouts `kubernetes_namespace` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - `delete` - Default `5 minutes` -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the namespace that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more about [name idempotency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency). -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) namespaces. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). - -* `name` - (Optional) Name of the namespace, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this namespace that can be used by clients to determine when namespaces have changed. Read more about [concurrency control and consistency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency). -* `uid` - The unique in time and space value for this namespace. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids). - -## Attribute Reference - -* `wait_for_default_service_account` - (Optional) When set to `true` Terraform will wait until the default service account has been asynchronously created by Kubernetes when creating the namespace resource. This has the equivalent effect of creating a `kubernetes_default_service_account` resource for dependent resources but allows a user to consume the "default" service account directly. The default behaviour (`false`) does not wait for the default service account to exist. - ## Import Namespaces can be imported using their name, e.g. diff --git a/docs/resources/namespace_v1.md b/docs/resources/namespace_v1.md index 6e5f260cea..c15c8cde13 100644 --- a/docs/resources/namespace_v1.md +++ b/docs/resources/namespace_v1.md @@ -9,6 +9,49 @@ description: |- Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces. Read more about namespaces at [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard namespace's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_default_service_account` (Boolean) Terraform will wait for the default service account to be created. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the namespace that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the namespace. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the namespace, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this namespace that can be used by clients to determine when namespace has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this namespace. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `timeouts` + +Optional: + +- `delete` (String) + + + + ## Example Usage ```terraform @@ -27,45 +70,12 @@ resource "kubernetes_namespace_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard namespace's [metadata](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - ### Timeouts `kubernetes_namespace_v1` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - `delete` - Default `5 minutes` -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the namespace that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more about [name idempotency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency). -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) namespaces. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the namespace, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this namespace that can be used by clients to determine when namespaces have changed. Read more about [concurrency control and consistency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency). -* `uid` - The unique in time and space value for this namespace. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -## Attribute Reference - -* `wait_for_default_service_account` - (Optional) When set to `true` Terraform will wait until the default service account has been asynchronously created by Kubernetes when creating the namespace resource. This has the equivalent effect of creating a `kubernetes_default_service_account_v1` resource for dependent resources but allows a user to consume the "default" service account directly. The default behaviour (`false`) does not wait for the default service account to exist. - ## Import Namespaces can be imported using their name, e.g. diff --git a/docs/resources/network_policy.md b/docs/resources/network_policy.md index 3c443fc55d..bb66cd13d2 100644 --- a/docs/resources/network_policy.md +++ b/docs/resources/network_policy.md @@ -10,6 +10,231 @@ description: |- Kubernetes supports network policies to specify how groups of pods are allowed to communicate with each other and with other network endpoints. NetworkPolicy resources use labels to select pods and define rules which specify what traffic is allowed to the selected pods. Read more about network policies at https://kubernetes.io/docs/concepts/services-networking/network-policies/ + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard network policy's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) spec represents the specification of the desired behavior for this NetworkPolicy. (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the network policy that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the network policy. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the network policy, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the network policy must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this network policy that can be used by clients to determine when network policy has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this network policy. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `pod_selector` (Block List, Min: 1, Max: 1) podSelector selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. (see [below for nested schema](#nestedblock--spec--pod_selector)) +- `policy_types` (List of String) policyTypes is a list of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of ingress or egress rules; policies that contain an egress section are assumed to affect egress, and all policies (whether or not they contain an ingress section) are assumed to affect ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + +Optional: + +- `egress` (Block List) egress is a list of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 (see [below for nested schema](#nestedblock--spec--egress)) +- `ingress` (Block List) ingress is a list of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default) (see [below for nested schema](#nestedblock--spec--ingress)) + + +### Nested Schema for `spec.pod_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--pod_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.pod_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.egress` + +Optional: + +- `ports` (Block List) ports is a list of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. (see [below for nested schema](#nestedblock--spec--egress--ports)) +- `to` (Block List) to is a list of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. (see [below for nested schema](#nestedblock--spec--egress--to)) + + +### Nested Schema for `spec.egress.ports` + +Optional: + +- `port` (String) port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +- `protocol` (String) protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. + + + +### Nested Schema for `spec.egress.to` + +Optional: + +- `ip_block` (Block List, Max: 1) ipBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. (see [below for nested schema](#nestedblock--spec--egress--to--ip_block)) +- `namespace_selector` (Block List, Max: 1) namespaceSelector selects namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + +If podSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the namespaces selected by namespaceSelector. Otherwise it selects all pods in the namespaces selected by namespaceSelector. (see [below for nested schema](#nestedblock--spec--egress--to--namespace_selector)) + +- `pod_selector` (Block List, Max: 1) podSelector is a label selector which selects pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + +If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the pods matching podSelector in the policy's own namespace. (see [below for nested schema](#nestedblock--spec--egress--to--pod_selector)) + + +### Nested Schema for `spec.egress.to.ip_block` + +Optional: + +- `cidr` (String) cidr is a string representing the IPBlock Valid examples are "192.168.1.0/24" or "2001:db8::/64" +- `except` (List of String) except is a slice of CIDRs that should not be included within an IPBlock Valid examples are "192.168.1.0/24" or "2001:db8::/64" Except values will be rejected if they are outside the cidr range + + + +### Nested Schema for `spec.egress.to.namespace_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--egress--to--namespace_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.egress.to.namespace_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.egress.to.pod_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--egress--to--pod_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.egress.to.pod_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.ingress` + +Optional: + +- `from` (Block List) from is a list of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list. (see [below for nested schema](#nestedblock--spec--ingress--from)) +- `ports` (Block List) ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. (see [below for nested schema](#nestedblock--spec--ingress--ports)) + + +### Nested Schema for `spec.ingress.from` + +Optional: + +- `ip_block` (Block List, Max: 1) ipBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. (see [below for nested schema](#nestedblock--spec--ingress--from--ip_block)) +- `namespace_selector` (Block List, Max: 1) namespaceSelector selects namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + +If podSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the namespaces selected by namespaceSelector. Otherwise it selects all pods in the namespaces selected by namespaceSelector. (see [below for nested schema](#nestedblock--spec--ingress--from--namespace_selector)) + +- `pod_selector` (Block List, Max: 1) podSelector is a label selector which selects pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + +If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the pods matching podSelector in the policy's own namespace. (see [below for nested schema](#nestedblock--spec--ingress--from--pod_selector)) + + +### Nested Schema for `spec.ingress.from.ip_block` + +Optional: + +- `cidr` (String) cidr is a string representing the IPBlock Valid examples are "192.168.1.0/24" or "2001:db8::/64" +- `except` (List of String) except is a slice of CIDRs that should not be included within an IPBlock Valid examples are "192.168.1.0/24" or "2001:db8::/64" Except values will be rejected if they are outside the cidr range + + + +### Nested Schema for `spec.ingress.from.namespace_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--ingress--from--namespace_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.ingress.from.namespace_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.ingress.from.pod_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--ingress--from--pod_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.ingress.from.pod_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.ingress.ports` + +Optional: + +- `port` (String) port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +- `protocol` (String) protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. + + + + + + ## Example Usage ```terraform @@ -64,113 +289,6 @@ resource "kubernetes_network_policy" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard network policy's [metadata](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the network policy that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more about [name idempotency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency). -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) network policies. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the network policy, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this network policy that can be used by clients to determine when network policies have changed. Read more about [concurrency control and consistency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency). -* `uid` - The unique in time and space value for this network policy. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `egress` - (Optional) List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this block is empty then this NetworkPolicy allows all outgoing traffic. If this block is omitted then this NetworkPolicy does not allow any outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). -* `ingress` - (Optional) List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this block is empty then this NetworkPolicy allows all incoming traffic. If this block is omitted then this NetworkPolicy does not allow any incoming traffic (and serves solely to ensure that the pods it selects are isolated by default). -* `pod_selector` - (Required) Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. -* `policy_types` (Required) List of rule types that the NetworkPolicy relates to. Valid options are `Ingress`, `Egress`, or `Ingress,Egress`. This field is beta-level in 1.8 **Note**: the native Kubernetes API allows not to specify the `policy_types` property with the following description: - - > If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). - - Leaving the `policy_types` property optional here would have prevented an `egress` rule added to a Network Policy initially created without any `egress` rule nor `policy_types` from working as expected. Indeed, the PolicyTypes would have stuck to Ingress server side as the default value is only computed server side on resource creation, not on updates. - -### `ingress` - -#### Arguments - -* `from` - (Optional) List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list. -* `ports` - (Optional) List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. - -### `egress` - -#### Arguments - -* `to` - (Optional) List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. -* `ports` - (Optional) List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. - -### `from` - -#### Arguments - -* `namespace_selector` - (Optional) Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. -* `pod_selector` - (Optional) This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - -### `ports` - -#### Arguments - -* `port` - (Optional) The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. -* `protocol` - (Optional) The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. - -### `to` - -#### Arguments - -* `ip_block` - (Optional) IPBlock defines policy on a particular IPBlock -* `namespace_selector` - (Optional) Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. -* `pod_selector` - (Optional) This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - -### `ip_block` - -#### Arguments - -* `cidr` - (Optional) CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" -* `except` - (Optional) Except is a slice of CIDRs that should not be included within an IP Block. Valid examples are "192.168.1.1/24". Except values will be rejected if they are outside the CIDR range. - -### `namespace_selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - -### `pod_selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - -### `match_expressions` - -#### Arguments - -* `key` - (Optional) The label key that the selector applies to. -* `operator` - (Optional) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. -* `values` - (Optional) 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. - ## Import Network policies can be imported using their identifier consisting of `/`, e.g.: diff --git a/docs/resources/network_policy_v1.md b/docs/resources/network_policy_v1.md index 0836044883..76dc4b035a 100644 --- a/docs/resources/network_policy_v1.md +++ b/docs/resources/network_policy_v1.md @@ -10,6 +10,231 @@ description: |- Kubernetes supports network policies to specify how groups of pods are allowed to communicate with each other and with other network endpoints. NetworkPolicy resources use labels to select pods and define rules which specify what traffic is allowed to the selected pods. Read more about network policies at https://kubernetes.io/docs/concepts/services-networking/network-policies/ + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard network policy's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) spec represents the specification of the desired behavior for this NetworkPolicy. (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the network policy that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the network policy. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the network policy, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the network policy must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this network policy that can be used by clients to determine when network policy has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this network policy. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `pod_selector` (Block List, Min: 1, Max: 1) podSelector selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. (see [below for nested schema](#nestedblock--spec--pod_selector)) +- `policy_types` (List of String) policyTypes is a list of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of ingress or egress rules; policies that contain an egress section are assumed to affect egress, and all policies (whether or not they contain an ingress section) are assumed to affect ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + +Optional: + +- `egress` (Block List) egress is a list of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 (see [below for nested schema](#nestedblock--spec--egress)) +- `ingress` (Block List) ingress is a list of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default) (see [below for nested schema](#nestedblock--spec--ingress)) + + +### Nested Schema for `spec.pod_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--pod_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.pod_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.egress` + +Optional: + +- `ports` (Block List) ports is a list of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. (see [below for nested schema](#nestedblock--spec--egress--ports)) +- `to` (Block List) to is a list of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. (see [below for nested schema](#nestedblock--spec--egress--to)) + + +### Nested Schema for `spec.egress.ports` + +Optional: + +- `port` (String) port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +- `protocol` (String) protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. + + + +### Nested Schema for `spec.egress.to` + +Optional: + +- `ip_block` (Block List, Max: 1) ipBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. (see [below for nested schema](#nestedblock--spec--egress--to--ip_block)) +- `namespace_selector` (Block List, Max: 1) namespaceSelector selects namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + +If podSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the namespaces selected by namespaceSelector. Otherwise it selects all pods in the namespaces selected by namespaceSelector. (see [below for nested schema](#nestedblock--spec--egress--to--namespace_selector)) + +- `pod_selector` (Block List, Max: 1) podSelector is a label selector which selects pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + +If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the pods matching podSelector in the policy's own namespace. (see [below for nested schema](#nestedblock--spec--egress--to--pod_selector)) + + +### Nested Schema for `spec.egress.to.ip_block` + +Optional: + +- `cidr` (String) cidr is a string representing the IPBlock Valid examples are "192.168.1.0/24" or "2001:db8::/64" +- `except` (List of String) except is a slice of CIDRs that should not be included within an IPBlock Valid examples are "192.168.1.0/24" or "2001:db8::/64" Except values will be rejected if they are outside the cidr range + + + +### Nested Schema for `spec.egress.to.namespace_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--egress--to--namespace_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.egress.to.namespace_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.egress.to.pod_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--egress--to--pod_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.egress.to.pod_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.ingress` + +Optional: + +- `from` (Block List) from is a list of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list. (see [below for nested schema](#nestedblock--spec--ingress--from)) +- `ports` (Block List) ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. (see [below for nested schema](#nestedblock--spec--ingress--ports)) + + +### Nested Schema for `spec.ingress.from` + +Optional: + +- `ip_block` (Block List, Max: 1) ipBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. (see [below for nested schema](#nestedblock--spec--ingress--from--ip_block)) +- `namespace_selector` (Block List, Max: 1) namespaceSelector selects namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + +If podSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the namespaces selected by namespaceSelector. Otherwise it selects all pods in the namespaces selected by namespaceSelector. (see [below for nested schema](#nestedblock--spec--ingress--from--namespace_selector)) + +- `pod_selector` (Block List, Max: 1) podSelector is a label selector which selects pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + +If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the pods matching podSelector in the policy's own namespace. (see [below for nested schema](#nestedblock--spec--ingress--from--pod_selector)) + + +### Nested Schema for `spec.ingress.from.ip_block` + +Optional: + +- `cidr` (String) cidr is a string representing the IPBlock Valid examples are "192.168.1.0/24" or "2001:db8::/64" +- `except` (List of String) except is a slice of CIDRs that should not be included within an IPBlock Valid examples are "192.168.1.0/24" or "2001:db8::/64" Except values will be rejected if they are outside the cidr range + + + +### Nested Schema for `spec.ingress.from.namespace_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--ingress--from--namespace_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.ingress.from.namespace_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.ingress.from.pod_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--ingress--from--pod_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.ingress.from.pod_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.ingress.ports` + +Optional: + +- `port` (String) port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +- `protocol` (String) protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. + + + + + + ## Example Usage ```terraform @@ -64,113 +289,6 @@ resource "kubernetes_network_policy_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard network policy's [metadata](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the network policy that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more about [name idempotency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency). -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) network policies. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the network policy, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this network policy that can be used by clients to determine when network policies have changed. Read more about [concurrency control and consistency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency). -* `uid` - The unique in time and space value for this network policy. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `egress` - (Optional) List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this block is empty then this NetworkPolicy allows all outgoing traffic. If this block is omitted then this NetworkPolicy does not allow any outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). -* `ingress` - (Optional) List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this block is empty then this NetworkPolicy allows all incoming traffic. If this block is omitted then this NetworkPolicy does not allow any incoming traffic (and serves solely to ensure that the pods it selects are isolated by default). -* `pod_selector` - (Required) Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. -* `policy_types` (Required) List of rule types that the NetworkPolicy relates to. Valid options are `Ingress`, `Egress`, or `Ingress,Egress`. This field is beta-level in 1.8 **Note**: the native Kubernetes API allows not to specify the `policy_types` property with the following description: - - > If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). - - Leaving the `policy_types` property optional here would have prevented an `egress` rule added to a Network Policy initially created without any `egress` rule nor `policy_types` from working as expected. Indeed, the PolicyTypes would have stuck to Ingress server side as the default value is only computed server side on resource creation, not on updates. - -### `ingress` - -#### Arguments - -* `from` - (Optional) List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list. -* `ports` - (Optional) List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. - -### `egress` - -#### Arguments - -* `to` - (Optional) List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. -* `ports` - (Optional) List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. - -### `from` - -#### Arguments - -* `namespace_selector` - (Optional) Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. -* `pod_selector` - (Optional) This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - -### `ports` - -#### Arguments - -* `port` - (Optional) The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. -* `protocol` - (Optional) The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. - -### `to` - -#### Arguments - -* `ip_block` - (Optional) IPBlock defines policy on a particular IPBlock -* `namespace_selector` - (Optional) Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. -* `pod_selector` - (Optional) This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - -### `ip_block` - -#### Arguments - -* `cidr` - (Optional) CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" -* `except` - (Optional) Except is a slice of CIDRs that should not be included within an IP Block. Valid examples are "192.168.1.1/24". Except values will be rejected if they are outside the CIDR range. - -### `namespace_selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - -### `pod_selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - -### `match_expressions` - -#### Arguments - -* `key` - (Optional) The label key that the selector applies to. -* `operator` - (Optional) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. -* `values` - (Optional) 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. - ## Import Network policies can be imported using their identifier consisting of `/`, e.g.: diff --git a/docs/resources/node_taint.md b/docs/resources/node_taint.md index 3c97806b0f..683d468a32 100644 --- a/docs/resources/node_taint.md +++ b/docs/resources/node_taint.md @@ -9,6 +9,43 @@ description: |- [Node affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) is a property of Pods that attracts them to a set of [nodes](https://kubernetes.io/docs/concepts/architecture/nodes/) (either as a preference or a hard requirement). Taints are the opposite -- they allow a node to repel a set of pods. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--metadata)) +- `taint` (Block List, Min: 1) (see [below for nested schema](#nestedblock--taint)) + +### Optional + +- `field_manager` (String) Set the name of the field manager for the node taint +- `force` (Boolean) Force overwriting annotations that were created or edited outside of Terraform. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Required: + +- `name` (String) The name of the node + + + +### Nested Schema for `taint` + +Required: + +- `effect` (String) The taint effect +- `key` (String) The taint key +- `value` (String) The taint value + + + + ## Example Usage ```terraform @@ -24,31 +61,6 @@ resource "kubernetes_node_taint" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Metadata describing which Kubernetes node to apply the taint to. -* `field_manager` - (Optional) Set the name of the field manager for the node taint. -* `force` - (Optional) Force overwriting annotations that were created or edited outside of Terraform. -* `taint` - (Required) The taint configuration to apply to the node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/). - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `name` - (Required) The name of the node to apply the taint to - -### `taint` - -#### Arguments - -* `key` - (Required, Forces new resource) The key of this node taint. -* `value` - (Required) The value of this node taint. Can be empty string. -* `effect` - (Required, Forces new resource) The scheduling effect to apply with this taint. Must be one of: `NoSchedule`, `PreferNoSchedule`, `NoExecute`. - ## Import This resource does not support the `import` command. As this resource operates on Kubernetes resources that already exist, creating the resource is equivalent to importing it. diff --git a/docs/resources/persistent_volume.md b/docs/resources/persistent_volume.md index 1ab98542cf..21b6a8f0c1 100644 --- a/docs/resources/persistent_volume.md +++ b/docs/resources/persistent_volume.md @@ -9,350 +9,546 @@ description: |- The resource provides a piece of networked storage in the cluster provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. Persistent Volumes have a lifecycle independent of any individual pod that uses the PV. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) -## Example Usage + +## Schema -```terraform -resource "kubernetes_persistent_volume" "example" { - metadata { - name = "terraform-example" - } - spec { - capacity = { - storage = "2Gi" - } - access_modes = ["ReadWriteMany"] - persistent_volume_source { - vsphere_volume { - volume_path = "/absolute/path" - } - } - } -} -``` +### Required -## Example: Persistent Volume using Azure Managed Disk +- `metadata` (Block List, Min: 1, Max: 1) Standard persistent volume's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1) Spec of the persistent volume owned by the cluster (see [below for nested schema](#nestedblock--spec)) -```terraform -resource "kubernetes_persistent_volume" "example" { - metadata { - name = "example" - } - spec { - capacity = { - storage = "1Gi" - } - access_modes = ["ReadWriteOnce"] - persistent_volume_source { - azure_disk { - caching_mode = "None" - data_disk_uri = azurerm_managed_disk.example.id - disk_name = "example" - kind = "Managed" - } - } - } -} +### Optional -provider "azurerm" { - version = ">=2.20.0" - features {} -} +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) -resource "azurerm_resource_group" "example" { - name = "example" - location = "westus2" -} +### Read-Only +- `id` (String) The ID of this resource. -resource "azurerm_managed_disk" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - storage_account_type = "Standard_LRS" - create_option = "Empty" - disk_size_gb = "1" - tags = { - environment = azurerm_resource_group.example.name - } -} -``` + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the persistent volume, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this persistent volume that can be used by clients to determine when persistent volume has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this persistent volume. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `access_modes` (Set of String) Contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `capacity` (Map of String) A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity +- `persistent_volume_source` (Block List, Min: 1, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--persistent_volume_source)) + +Optional: + +- `claim_ref` (Block List, Max: 1) A reference to the persistent volume claim details for statically managed PVs. More Info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding (see [below for nested schema](#nestedblock--spec--claim_ref)) +- `mount_options` (Set of String) A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. +- `node_affinity` (Block List, Max: 1) A description of the persistent volume's node affinity. More info: https://kubernetes.io/docs/concepts/storage/volumes/#local (see [below for nested schema](#nestedblock--spec--node_affinity)) +- `persistent_volume_reclaim_policy` (String) What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming +- `storage_class_name` (String) A description of the persistent volume's class. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class +- `volume_mode` (String) Defines if a volume is intended to be used with a formatted filesystem. or to remain in raw block state. + + +### Nested Schema for `spec.persistent_volume_source` + +Optional: + +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--persistent_volume_source--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--persistent_volume_source--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--persistent_volume_source--cinder)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--persistent_volume_source--csi)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--persistent_volume_source--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--persistent_volume_source--gce_persistent_disk)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--persistent_volume_source--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--persistent_volume_source--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--persistent_volume_source--local)) +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--persistent_volume_source--nfs)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--persistent_volume_source--photon_persistent_disk)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--persistent_volume_source--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--persistent_volume_source--rbd)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--persistent_volume_source--vsphere_volume)) + + +### Nested Schema for `spec.persistent_volume_source.aws_elastic_block_store` + +Required: + +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + +### Nested Schema for `spec.persistent_volume_source.azure_disk` + +Required: + +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage + +Optional: + +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.persistent_volume_source.azure_file` + +Required: + +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name + +Optional: + +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. + + + +### Nested Schema for `spec.persistent_volume_source.ceph_fs` + +Required: + +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +Optional: + +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--persistent_volume_source--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + +### Nested Schema for `spec.persistent_volume_source.ceph_fs.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.persistent_volume_source.cinder` + +Required: + +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +Optional: + +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + +### Nested Schema for `spec.persistent_volume_source.csi` + +Required: + +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi +- `volume_handle` (String) A string value that uniquely identifies the volume. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi + +Optional: -## Argument Reference +- `controller_expand_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--csi--controller_expand_secret_ref)) +- `controller_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--csi--controller_publish_secret_ref)) +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--csi--node_publish_secret_ref)) +- `node_stage_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--csi--node_stage_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. -The following arguments are supported: + +### Nested Schema for `spec.persistent_volume_source.csi.controller_expand_secret_ref` -* `metadata` - (Required) Standard persistent volume's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec of the persistent volume owned by the cluster. See below. +Optional: -## Nested Blocks +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `spec` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.csi.controller_publish_secret_ref` -* `access_modes` - (Required) Contains all ways the volume can be mounted. Valid values are `ReadWriteOnce`, `ReadOnlyMany`, `ReadWriteMany`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) -* `capacity` - (Required) A description of the persistent volume's resources and capacity. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity) -* `node_affinity` - (Optional) NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume. -* `persistent_volume_reclaim_policy` - (Optional) What happens to a persistent volume when released from its claim. Valid options are Retain (default), Delete and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming) -* `persistent_volume_source` - (Required) The specification of a persistent volume. -* `storage_class_name` - (Optional) The name of the persistent volume's storage class. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class) -* `mount_options` - (Optional) A Kubernetes administrator can specify additional mount options for when a Persistent Volume is mounted on a node. +Optional: -~> Not all Persistent Volume types support mount options. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `volume_mode` - (Optional) Defines if a volume is used with a formatted filesystem or to remain in raw block state. Possible values are `Block` and `Filesystem`. Default value is `Filesystem`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode) -### `node_affinity` + +### Nested Schema for `spec.persistent_volume_source.csi.node_publish_secret_ref` -#### Arguments +Optional: -* `required` - (Optional) Required specifies hard node constraints that must be met. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `required` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.csi.node_stage_secret_ref` -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. +Optional: -### `node_selector_term` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. -* `match_fields` - (Optional) A list of node selector requirements by node's fields. -### `match_expressions` and `match_fields` + +### Nested Schema for `spec.persistent_volume_source.fc` -#### Arguments +Required: -* `key` - (Required) The label key that the selector applies to. -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are `In`, `NotIn`, `Exists`, `DoesNotExist`. `Gt`, and `Lt`. -* `values` - (Optional) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. If the operator is `Gt` or `Lt`, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) -### `persistent_volume_source` +Optional: -#### Arguments +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime. -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/tree/master/mysql-cinder-pd#mysql-installation-with-cinder-volume-plugin. -* `csi` - (Optional) CSI represents storage that is handled by an external CSI driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk). -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `local` - (Optional) Represents a local storage volume on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#local). -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs). -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime. -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine. -### `aws_elastic_block_store` + +### Nested Schema for `spec.persistent_volume_source.flex_volume` -#### Arguments +Required: -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) +- `driver` (String) Driver is the name of the driver to use for this volume. -### `azure_disk` +Optional: -#### Arguments +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--flex_volume--secret_ref)) -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage OR the resource ID of an Azure managed data disk if `kind` is `Managed`. -* `disk_name` - (Required) The Name of the data disk in the blob storage OR the name of an Azure managed data disk if `kind` is `Managed`. -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `kind` - (Optional) The type for the data disk. Expected values: `Shared`, `Dedicated`, `Managed`. Defaults to `Shared`. + +### Nested Schema for `spec.persistent_volume_source.flex_volume.secret_ref` -### `azure_file` +Optional: -#### Arguments +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key. -* `secret_namespace` - (Optional) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is \"default\" namespace. -* `share_name` - (Required) Share Name -### `ceph_fs` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.flocker` -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. sFor more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. see [secret_ref](#secret_ref) for more details. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. +Optional: -### `cinder` +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset -#### Arguments -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. + +### Nested Schema for `spec.persistent_volume_source.gce_persistent_disk` -### `csi` +Required: -#### Arguments +- `pd_name` (String) 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 -* `driver` - (Required) the name of the volume driver to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_handle` - (Required) A map that specifies static properties of a volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_attributes` - (Optional) Attributes of the volume to publish. -* `fs_type` - (Optional) Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. `ext4`, `xfs`, `ntfs`. -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to `true`. If omitted, the default is `false`. -* `controller_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -* `node_stage_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. see [secret_ref](#secret_ref) for more details. -* `node_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -* `controller_expand_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. see [secret_ref](#secret_ref) for more details. +Optional: -### `fc` +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk -#### Arguments -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) + +### Nested Schema for `spec.persistent_volume_source.glusterfs` -### `flex_volume` +Required: -#### Arguments +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. see [secret_ref](#secret_ref) for more details. +Optional: -### `flocker` +- `read_only` (Boolean) Whether to 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 -#### Arguments -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset + +### Nested Schema for `spec.persistent_volume_source.host_path` -### `gce_persistent_disk` +Optional: -#### Arguments +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -### `glusterfs` + +### Nested Schema for `spec.persistent_volume_source.iscsi` -#### Arguments +Required: -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). -### `host_path` +Optional: -#### Arguments +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -### `iscsi` + +### Nested Schema for `spec.persistent_volume_source.local` -#### Arguments +Optional: -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local -### `local` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.nfs` -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#local) +Required: -### `metadata` +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -#### Arguments +Optional: -* `annotations` - (Optional) An unstructured key value map stored with the persistent volume that may be used to store arbitrary metadata. +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume. May match selectors of replication controllers and services. + +### Nested Schema for `spec.persistent_volume_source.photon_persistent_disk` -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +Required: -* `name` - (Optional) Name of the persistent volume, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `pd_id` (String) ID that identifies Photon Controller persistent disk -#### Attributes +Optional: -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this persistent volume that can be used by clients to determine when persistent volume has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this persistent volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +- `fs_type` (String) 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. -### `nfs` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.quobyte` -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) +Required: -### `photon_persistent_disk` +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. -#### Arguments +Optional: -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user -### `quobyte` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.rbd` -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. +Required: -### `rbd` +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it -#### Arguments +Optional: -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. see [secret_ref](#secret_ref) for more details. +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--persistent_volume_source--rbd--secret_ref)) -### `secret_ref` + +### Nested Schema for `spec.persistent_volume_source.rbd.secret_ref` -#### Arguments +Optional: -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) The Namespace of the referent secret. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `vsphere_volume` -#### Arguments -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk + +### Nested Schema for `spec.persistent_volume_source.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + +### Nested Schema for `spec.claim_ref` + +Required: + +- `name` (String) The name of the PersistentVolumeClaim + +Optional: + +- `namespace` (String) The namespace of the PersistentVolumeClaim. Uses 'default' namespace if none is specified. + + + +### Nested Schema for `spec.node_affinity` + +Optional: + +- `required` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--node_affinity--required)) + + +### Nested Schema for `spec.node_affinity.required` + +Required: + +- `node_selector_term` (Block List, Min: 1) (see [below for nested schema](#nestedblock--spec--node_affinity--required--node_selector_term)) + + +### Nested Schema for `spec.node_affinity.required.node_selector_term` + +Optional: + +- `match_expressions` (Block List) A list of node selector requirements by node's labels. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--node_affinity--required--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--node_affinity--required--node_selector_term--match_fields)) + + +### Nested Schema for `spec.node_affinity.required.node_selector_term.match_expressions` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.node_affinity.required.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + + + + +## Example Usage + +```terraform +resource "kubernetes_persistent_volume" "example" { + metadata { + name = "terraform-example" + } + spec { + capacity = { + storage = "2Gi" + } + access_modes = ["ReadWriteMany"] + persistent_volume_source { + vsphere_volume { + volume_path = "/absolute/path" + } + } + } +} +``` + +## Example: Persistent Volume using Azure Managed Disk + +```terraform +resource "kubernetes_persistent_volume" "example" { + metadata { + name = "example" + } + spec { + capacity = { + storage = "1Gi" + } + access_modes = ["ReadWriteOnce"] + persistent_volume_source { + azure_disk { + caching_mode = "None" + data_disk_uri = azurerm_managed_disk.example.id + disk_name = "example" + kind = "Managed" + } + } + } +} + +provider "azurerm" { + version = ">=2.20.0" + features {} +} + +resource "azurerm_resource_group" "example" { + name = "example" + location = "westus2" +} + + +resource "azurerm_managed_disk" "example" { + name = "example" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + storage_account_type = "Standard_LRS" + create_option = "Empty" + disk_size_gb = "1" + tags = { + environment = azurerm_resource_group.example.name + } +} +``` ## Import diff --git a/docs/resources/persistent_volume_claim.md b/docs/resources/persistent_volume_claim.md index 5b304279cf..1a500c8bb3 100644 --- a/docs/resources/persistent_volume_claim.md +++ b/docs/resources/persistent_volume_claim.md @@ -9,6 +9,95 @@ description: |- This resource allows the user to request for and claim to a persistent volume. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard persistent volume claim's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_until_bound` (Boolean) Whether to wait for the claim to reach `Bound` state (to find volume in which to claim the space) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the persistent volume claim, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the persistent volume claim must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this persistent volume claim that can be used by clients to determine when persistent volume claim has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this persistent volume claim. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + + + + ## Example Usage ```terraform @@ -45,71 +134,6 @@ resource "kubernetes_persistent_volume" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard persistent volume claim's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the desired characteristics of a volume requested by a pod author. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) -* `wait_until_bound` - (Optional) Whether to wait for the claim to reach `Bound` state (to find volume in which to claim the space) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the persistent volume claim, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the persistent volume claim must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this persistent volume claim that can be used by clients to determine when persistent volume claim has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this persistent volume claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `access_modes` - (Required) A set of the desired access modes the volume should have. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes) -* `resources` - (Required) A list of the minimum resources the volume should have. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `selector` - (Optional) A label query over volumes to consider for binding. -* `volume_name` - (Optional) The binding reference to the PersistentVolume backing this claim. -* `storage_class_name` - (Optional) Name of the storage class requested by the claim. -* `volume_mode` - (Optional) Defines what type of volume is required by the claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode) - -### `match_expressions` - -#### Arguments - -* `key` - (Optional) The label key that the selector applies to. -* `operator` - (Optional) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. -* `values` - (Optional) 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. - -### `resources` - -#### Arguments - -* `limits` - (Optional) Map describing the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) - -### `selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - ## Import Persistent Volume Claim can be imported using its namespace and name, e.g. diff --git a/docs/resources/persistent_volume_claim_v1.md b/docs/resources/persistent_volume_claim_v1.md index 336e226ba0..98192c6536 100644 --- a/docs/resources/persistent_volume_claim_v1.md +++ b/docs/resources/persistent_volume_claim_v1.md @@ -9,6 +9,95 @@ description: |- This resource allows the user to request for and claim to a persistent volume. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard persistent volume claim's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_until_bound` (Boolean) Whether to wait for the claim to reach `Bound` state (to find volume in which to claim the space) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the persistent volume claim, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the persistent volume claim must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this persistent volume claim that can be used by clients to determine when persistent volume claim has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this persistent volume claim. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + + + + ## Example Usage ```terraform @@ -45,71 +134,6 @@ resource "kubernetes_persistent_volume_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard persistent volume claim's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the desired characteristics of a volume requested by a pod author. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) -* `wait_until_bound` - (Optional) Whether to wait for the claim to reach `Bound` state (to find volume in which to claim the space) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the persistent volume claim, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the persistent volume claim must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this persistent volume claim that can be used by clients to determine when persistent volume claim has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this persistent volume claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `access_modes` - (Required) A set of the desired access modes the volume should have. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes) -* `resources` - (Required) A list of the minimum resources the volume should have. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `selector` - (Optional) A label query over volumes to consider for binding. -* `volume_name` - (Optional) The binding reference to the PersistentVolume backing this claim. -* `storage_class_name` - (Optional) Name of the storage class requested by the claim. -* `volume_mode` - (Optional) Defines what type of volume is required by the claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode) - -### `match_expressions` - -#### Arguments - -* `key` - (Optional) The label key that the selector applies to. -* `operator` - (Optional) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. -* `values` - (Optional) 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. - -### `resources` - -#### Arguments - -* `limits` - (Optional) Map describing the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) - -### `selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - ## Import Persistent Volume Claim can be imported using its namespace and name, e.g. diff --git a/docs/resources/persistent_volume_v1.md b/docs/resources/persistent_volume_v1.md index 43fdebbd55..89da63119a 100644 --- a/docs/resources/persistent_volume_v1.md +++ b/docs/resources/persistent_volume_v1.md @@ -9,350 +9,546 @@ description: |- The resource provides a piece of networked storage in the cluster provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. Persistent Volumes have a lifecycle independent of any individual pod that uses the PV. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) -## Example Usage + +## Schema -```terraform -resource "kubernetes_persistent_volume_v1" "example" { - metadata { - name = "terraform-example" - } - spec { - capacity = { - storage = "2Gi" - } - access_modes = ["ReadWriteMany"] - persistent_volume_source { - vsphere_volume { - volume_path = "/absolute/path" - } - } - } -} -``` +### Required -## Example: Persistent Volume using Azure Managed Disk +- `metadata` (Block List, Min: 1, Max: 1) Standard persistent volume's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1) Spec of the persistent volume owned by the cluster (see [below for nested schema](#nestedblock--spec)) -```terraform -resource "kubernetes_persistent_volume_v1" "example" { - metadata { - name = "example" - } - spec { - capacity = { - storage = "1Gi" - } - access_modes = ["ReadWriteOnce"] - persistent_volume_source { - azure_disk { - caching_mode = "None" - data_disk_uri = azurerm_managed_disk.example.id - disk_name = "example" - kind = "Managed" - } - } - } -} +### Optional -provider "azurerm" { - version = ">=2.20.0" - features {} -} +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) -resource "azurerm_resource_group" "example" { - name = "example" - location = "westus2" -} +### Read-Only +- `id` (String) The ID of this resource. -resource "azurerm_managed_disk" "example" { - name = "example" - location = azurerm_resource_group.example.location - resource_group_name = azurerm_resource_group.example.name - storage_account_type = "Standard_LRS" - create_option = "Empty" - disk_size_gb = "1" - tags = { - environment = azurerm_resource_group.example.name - } -} -``` + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the persistent volume, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this persistent volume that can be used by clients to determine when persistent volume has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this persistent volume. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `access_modes` (Set of String) Contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `capacity` (Map of String) A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity +- `persistent_volume_source` (Block List, Min: 1, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--persistent_volume_source)) + +Optional: + +- `claim_ref` (Block List, Max: 1) A reference to the persistent volume claim details for statically managed PVs. More Info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding (see [below for nested schema](#nestedblock--spec--claim_ref)) +- `mount_options` (Set of String) A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. +- `node_affinity` (Block List, Max: 1) A description of the persistent volume's node affinity. More info: https://kubernetes.io/docs/concepts/storage/volumes/#local (see [below for nested schema](#nestedblock--spec--node_affinity)) +- `persistent_volume_reclaim_policy` (String) What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming +- `storage_class_name` (String) A description of the persistent volume's class. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class +- `volume_mode` (String) Defines if a volume is intended to be used with a formatted filesystem. or to remain in raw block state. + + +### Nested Schema for `spec.persistent_volume_source` + +Optional: + +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--persistent_volume_source--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--persistent_volume_source--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--persistent_volume_source--cinder)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--persistent_volume_source--csi)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--persistent_volume_source--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--persistent_volume_source--gce_persistent_disk)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--persistent_volume_source--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--persistent_volume_source--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--persistent_volume_source--local)) +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--persistent_volume_source--nfs)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--persistent_volume_source--photon_persistent_disk)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--persistent_volume_source--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--persistent_volume_source--rbd)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--persistent_volume_source--vsphere_volume)) + + +### Nested Schema for `spec.persistent_volume_source.aws_elastic_block_store` + +Required: + +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + +### Nested Schema for `spec.persistent_volume_source.azure_disk` + +Required: + +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage + +Optional: + +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.persistent_volume_source.azure_file` + +Required: + +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name + +Optional: + +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. + + + +### Nested Schema for `spec.persistent_volume_source.ceph_fs` + +Required: + +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +Optional: + +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--persistent_volume_source--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + +### Nested Schema for `spec.persistent_volume_source.ceph_fs.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.persistent_volume_source.cinder` + +Required: + +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +Optional: + +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + +### Nested Schema for `spec.persistent_volume_source.csi` + +Required: + +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi +- `volume_handle` (String) A string value that uniquely identifies the volume. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi + +Optional: -## Argument Reference +- `controller_expand_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--csi--controller_expand_secret_ref)) +- `controller_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--csi--controller_publish_secret_ref)) +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--csi--node_publish_secret_ref)) +- `node_stage_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--csi--node_stage_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. -The following arguments are supported: + +### Nested Schema for `spec.persistent_volume_source.csi.controller_expand_secret_ref` -* `metadata` - (Required) Standard persistent volume's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec of the persistent volume owned by the cluster. See below. +Optional: -## Nested Blocks +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `spec` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.csi.controller_publish_secret_ref` -* `access_modes` - (Required) Contains all ways the volume can be mounted. Valid values are `ReadWriteOnce`, `ReadOnlyMany`, `ReadWriteMany`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) -* `capacity` - (Required) A description of the persistent volume's resources and capacity. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity) -* `node_affinity` - (Optional) NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume. -* `persistent_volume_reclaim_policy` - (Optional) What happens to a persistent volume when released from its claim. Valid options are Retain (default), Delete and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming) -* `persistent_volume_source` - (Required) The specification of a persistent volume. -* `storage_class_name` - (Optional) The name of the persistent volume's storage class. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class) -* `mount_options` - (Optional) A Kubernetes administrator can specify additional mount options for when a Persistent Volume is mounted on a node. +Optional: -~> Not all Persistent Volume types support mount options. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `volume_mode` - (Optional) Defines if a volume is used with a formatted filesystem or to remain in raw block state. Possible values are `Block` and `Filesystem`. Default value is `Filesystem`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode) -### `node_affinity` + +### Nested Schema for `spec.persistent_volume_source.csi.node_publish_secret_ref` -#### Arguments +Optional: -* `required` - (Optional) Required specifies hard node constraints that must be met. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `required` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.csi.node_stage_secret_ref` -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. +Optional: -### `node_selector_term` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. -* `match_fields` - (Optional) A list of node selector requirements by node's fields. -### `match_expressions` and `match_fields` + +### Nested Schema for `spec.persistent_volume_source.fc` -#### Arguments +Required: -* `key` - (Required) The label key that the selector applies to. -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are `In`, `NotIn`, `Exists`, `DoesNotExist`. `Gt`, and `Lt`. -* `values` - (Optional) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. If the operator is `Gt` or `Lt`, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) -### `persistent_volume_source` +Optional: -#### Arguments +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime. -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/tree/master/mysql-cinder-pd#mysql-installation-with-cinder-volume-plugin. -* `csi` - (Optional) CSI represents storage that is handled by an external CSI driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk). -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `local` - (Optional) Represents a local storage volume on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#local). -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs). -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime. -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine. -### `aws_elastic_block_store` + +### Nested Schema for `spec.persistent_volume_source.flex_volume` -#### Arguments +Required: -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) +- `driver` (String) Driver is the name of the driver to use for this volume. -### `azure_disk` +Optional: -#### Arguments +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--persistent_volume_source--flex_volume--secret_ref)) -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage OR the resource ID of an Azure managed data disk if `kind` is `Managed`. -* `disk_name` - (Required) The Name of the data disk in the blob storage OR the name of an Azure managed data disk if `kind` is `Managed`. -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `kind` - (Optional) The type for the data disk. Expected values: `Shared`, `Dedicated`, `Managed`. Defaults to `Shared`. + +### Nested Schema for `spec.persistent_volume_source.flex_volume.secret_ref` -### `azure_file` +Optional: -#### Arguments +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key. -* `secret_namespace` - (Optional) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is \"default\" namespace. -* `share_name` - (Required) Share Name -### `ceph_fs` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.flocker` -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. sFor more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. see [secret_ref](#secret_ref) for more details. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. +Optional: -### `cinder` +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset -#### Arguments -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. + +### Nested Schema for `spec.persistent_volume_source.gce_persistent_disk` -### `csi` +Required: -#### Arguments +- `pd_name` (String) 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 -* `driver` - (Required) the name of the volume driver to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_handle` - (Required) A map that specifies static properties of a volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_attributes` - (Optional) Attributes of the volume to publish. -* `fs_type` - (Optional) Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. `ext4`, `xfs`, `ntfs`. -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to `true`. If omitted, the default is `false`. -* `controller_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -* `node_stage_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. see [secret_ref](#secret_ref) for more details. -* `node_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -* `controller_expand_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. see [secret_ref](#secret_ref) for more details. +Optional: -### `fc` +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk -#### Arguments -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) + +### Nested Schema for `spec.persistent_volume_source.glusterfs` -### `flex_volume` +Required: -#### Arguments +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. see [secret_ref](#secret_ref) for more details. +Optional: -### `flocker` +- `read_only` (Boolean) Whether to 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 -#### Arguments -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset + +### Nested Schema for `spec.persistent_volume_source.host_path` -### `gce_persistent_disk` +Optional: -#### Arguments +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -### `glusterfs` + +### Nested Schema for `spec.persistent_volume_source.iscsi` -#### Arguments +Required: -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). -### `host_path` +Optional: -#### Arguments +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -### `iscsi` + +### Nested Schema for `spec.persistent_volume_source.local` -#### Arguments +Optional: -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local -### `local` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.nfs` -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#local) +Required: -### `metadata` +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -#### Arguments +Optional: -* `annotations` - (Optional) An unstructured key value map stored with the persistent volume that may be used to store arbitrary metadata. +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume. May match selectors of replication controllers and services. + +### Nested Schema for `spec.persistent_volume_source.photon_persistent_disk` -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +Required: -* `name` - (Optional) Name of the persistent volume, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `pd_id` (String) ID that identifies Photon Controller persistent disk -#### Attributes +Optional: -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this persistent volume that can be used by clients to determine when persistent volume has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this persistent volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +- `fs_type` (String) 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. -### `nfs` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.quobyte` -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) +Required: -### `photon_persistent_disk` +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. -#### Arguments +Optional: -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user -### `quobyte` -#### Arguments + +### Nested Schema for `spec.persistent_volume_source.rbd` -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. +Required: -### `rbd` +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it -#### Arguments +Optional: -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. see [secret_ref](#secret_ref) for more details. +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--persistent_volume_source--rbd--secret_ref)) -### `secret_ref` + +### Nested Schema for `spec.persistent_volume_source.rbd.secret_ref` -#### Arguments +Optional: -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) The Namespace of the referent secret. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `vsphere_volume` -#### Arguments -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk + +### Nested Schema for `spec.persistent_volume_source.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + +### Nested Schema for `spec.claim_ref` + +Required: + +- `name` (String) The name of the PersistentVolumeClaim + +Optional: + +- `namespace` (String) The namespace of the PersistentVolumeClaim. Uses 'default' namespace if none is specified. + + + +### Nested Schema for `spec.node_affinity` + +Optional: + +- `required` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec--node_affinity--required)) + + +### Nested Schema for `spec.node_affinity.required` + +Required: + +- `node_selector_term` (Block List, Min: 1) (see [below for nested schema](#nestedblock--spec--node_affinity--required--node_selector_term)) + + +### Nested Schema for `spec.node_affinity.required.node_selector_term` + +Optional: + +- `match_expressions` (Block List) A list of node selector requirements by node's labels. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--node_affinity--required--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--node_affinity--required--node_selector_term--match_fields)) + + +### Nested Schema for `spec.node_affinity.required.node_selector_term.match_expressions` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.node_affinity.required.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + + + + +## Example Usage + +```terraform +resource "kubernetes_persistent_volume_v1" "example" { + metadata { + name = "terraform-example" + } + spec { + capacity = { + storage = "2Gi" + } + access_modes = ["ReadWriteMany"] + persistent_volume_source { + vsphere_volume { + volume_path = "/absolute/path" + } + } + } +} +``` + +## Example: Persistent Volume using Azure Managed Disk + +```terraform +resource "kubernetes_persistent_volume_v1" "example" { + metadata { + name = "example" + } + spec { + capacity = { + storage = "1Gi" + } + access_modes = ["ReadWriteOnce"] + persistent_volume_source { + azure_disk { + caching_mode = "None" + data_disk_uri = azurerm_managed_disk.example.id + disk_name = "example" + kind = "Managed" + } + } + } +} + +provider "azurerm" { + version = ">=2.20.0" + features {} +} + +resource "azurerm_resource_group" "example" { + name = "example" + location = "westus2" +} + + +resource "azurerm_managed_disk" "example" { + name = "example" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + storage_account_type = "Standard_LRS" + create_option = "Empty" + disk_size_gb = "1" + tags = { + environment = azurerm_resource_group.example.name + } +} +``` ## Import diff --git a/docs/resources/pod.md b/docs/resources/pod.md index d7e9465402..636964a54b 100644 --- a/docs/resources/pod.md +++ b/docs/resources/pod.md @@ -11,973 +11,2321 @@ A pod is a group of one or more containers, the shared storage for those contain Read more at [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod/) -## Example Usage + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard pod's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Specification of the desired behavior of the pod. (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `target_state` (List of String) A list of the pod phases that indicate whether it was successfully created. Options: "Pending", "Running", "Succeeded", "Failed", "Unknown". Default: "Running". More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the pod that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the pod. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the pod, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the pod must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this pod that can be used by clients to determine when pod has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--volume)) + + +### Nested Schema for `spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--container--env--value_from)) + + +### Nested Schema for `spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.init_container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.init_container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.init_container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.init_container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.init_container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.init_container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.init_container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.init_container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.init_container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.init_container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.init_container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.init_container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--init_container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.init_container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.init_container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.init_container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.init_container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.init_container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.init_container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.init_container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.init_container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.init_container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.init_container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.os` + +Required: + +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. + + + +### Nested Schema for `spec.readiness_gate` + +Required: + +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. + + + +### Nested Schema for `spec.security_context` + +Optional: + +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--security_context--windows_options)) + + +### Nested Schema for `spec.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + +### Nested Schema for `spec.security_context.sysctl` + +Required: + +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. + + + +### Nested Schema for `spec.security_context.windows_options` + +Optional: + +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. + + + + +### Nested Schema for `spec.toleration` + +Optional: -```terraform -resource "kubernetes_pod" "test" { - metadata { - name = "terraform-example" - } +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - spec { - container { - image = "nginx:1.21.6" - name = "example" - env { - name = "environment" - value = "test" - } + +### Nested Schema for `spec.topology_spread_constraint` - port { - container_port = 80 - } +Optional: - liveness_probe { - http_get { - path = "/" - port = 80 +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. - http_header { - name = "X-Custom-Header" - value = "Awesome" - } - } + +### Nested Schema for `spec.topology_spread_constraint.label_selector` - initial_delay_seconds = 3 - period_seconds = 3 - } - } +Optional: - dns_config { - nameservers = ["1.1.1.1", "8.8.8.8", "9.9.9.9"] - searches = ["example.com"] +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - option { - name = "ndots" - value = 1 - } + +### Nested Schema for `spec.topology_spread_constraint.label_selector.match_expressions` - option { - name = "use-vc" - } - } +Optional: - dns_policy = "None" - } -} -``` +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. -terraform version of the [pods/pod-with-node-affinity.yaml](https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/pods/pod-with-node-affinity.yaml) example. -```terraform -resource "kubernetes_pod" "with_node_affinity" { - metadata { - name = "with-node-affinity" - } - spec { - affinity { - node_affinity { - required_during_scheduling_ignored_during_execution { - node_selector_term { - match_expressions { - key = "kubernetes.io/e2e-az-name" - operator = "In" - values = ["e2e-az1", "e2e-az2"] - } - } - } - preferred_during_scheduling_ignored_during_execution { - weight = 1 + +### Nested Schema for `spec.volume` - preference { - match_expressions { - key = "another-node-label-key" - operator = "In" - values = ["another-node-label-value"] - } - } - } - } - } +Optional: - container { - name = "with-node-affinity" - image = "k8s.gcr.io/pause:2.0" - } - } -} -``` +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--volume--vsphere_volume)) -terraform version of the [pods/pod-with-pod-affinity.yaml](https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/pods/pod-with-pod-affinity.yaml) example. + +### Nested Schema for `spec.volume.aws_elastic_block_store` -```terraform -resource "kubernetes_pod" "with_pod_affinity" { - metadata { - name = "with-pod-affinity" - } +Required: - spec { - affinity { - pod_affinity { - required_during_scheduling_ignored_during_execution { - label_selector { - match_expressions { - key = "security" - operator = "In" - values = ["S1"] - } - } +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - topology_key = "failure-domain.beta.kubernetes.io/zone" - } - } +Optional: - pod_anti_affinity { - preferred_during_scheduling_ignored_during_execution { - weight = 100 +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - pod_affinity_term { - label_selector { - match_expressions { - key = "security" - operator = "In" - values = ["S2"] - } - } - topology_key = "failure-domain.beta.kubernetes.io/zone" - } - } - } - } + +### Nested Schema for `spec.volume.azure_disk` - container { - name = "with-pod-affinity" - image = "k8s.gcr.io/pause:2.0" - } - } -} -``` +Required: -## Argument Reference +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage -The following arguments are supported: +Optional: -* `metadata` - (Required) Standard pod's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec of the pod owned by the cluster -* `target_state` - (Optional) A list of the pod phases that indicate whether it was successfully created. Options: "Pending", "Running", "Succeeded", "Failed", "Unknown". Default: "Running". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase") +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -## Nested Blocks -### `metadata` + +### Nested Schema for `spec.volume.azure_file` -#### Arguments +Required: -* `annotations` - (Optional) An unstructured key value map stored with the pod that may be used to store arbitrary metadata. +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +Optional: -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the pod. May match selectors of replication controllers and services. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) -* `name` - (Optional) Name of the pod, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the pod must be unique. + +### Nested Schema for `spec.volume.ceph_fs` -#### Attributes +Required: -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this pod that can be used by clients to determine when pod has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -### `spec` +Optional: -#### Arguments +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true` for Pods. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `os` - (Optional) Specifies the OS of the containers in the pod. -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the formerer being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `scheduler_name` - (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `topology_spread_constraint` - (Optional) Describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) -* `readiness_gate` - (Optional) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True". [More info](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-readiness-gate) + +### Nested Schema for `spec.volume.ceph_fs.secret_ref` -### `affinity` +Optional: -#### Arguments +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -### `node_affinity` -#### Arguments + +### Nested Schema for `spec.volume.cinder` -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. +Required: -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md -### `required_during_scheduling_ignored_during_execution` +Optional: -#### Arguments +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. -## `node_selector_term` + +### Nested Schema for `spec.volume.config_map` -#### Arguments +Optional: -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. -* `match_fields` - (Optional) A list of node selector requirements by node's fields. + +### Nested Schema for `spec.volume.config_map.items` -### `match_expressions` / `match_fields` +Optional: -#### Arguments +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -* `key` - (Required) The label key that the selector applies to. -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. + +### Nested Schema for `spec.volume.csi` -### `preferred_during_scheduling_ignored_during_execution` +Required: -#### Arguments +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi -* `preference` - (Required) A node selector term, associated with the corresponding weight. +Optional: -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. -### `preference` + +### Nested Schema for `spec.volume.csi.node_publish_secret_ref` -#### Arguments +Optional: -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `match_fields` - (Optional) A list of node selector requirements by node's fields. -## `match_expressions` / `match_fields` -#### Arguments + +### Nested Schema for `spec.volume.downward_api` -* `key` - (Required) The label key that the selector applies to. +Optional: -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--volume--downward_api--items)) -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. + +### Nested Schema for `spec.volume.downward_api.items` -### `pod_affinity` +Required: -#### Arguments +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. +Optional: -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--volume--downward_api--items--resource_field_ref)) -### `pod_anti_affinity` + +### Nested Schema for `spec.volume.downward_api.items.field_ref` -#### Arguments +Optional: -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) + +### Nested Schema for `spec.volume.downward_api.items.resource_field_ref` -#### Arguments +Required: -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Optional) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. +- `container_name` (String) +- `resource` (String) Resource to select -### `preferred_during_scheduling_ignored_during_execution` +Optional: -#### Arguments +- `divisor` (String) -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. -### `os` -#### Arguments -* `name` - (Required) Name is the name of the operating system. The currently supported values are `linux` and `windows`. + +### Nested Schema for `spec.volume.empty_dir` -### `container` +Optional: -#### Arguments +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) Block(s) of [port](#port)s to expose on the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. May be used multiple times. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `termination_message_policy` - (Optional): Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. -### `aws_elastic_block_store` + +### Nested Schema for `spec.volume.ephemeral` -#### Arguments +Required: -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template)) -### `azure_disk` + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template` -#### Arguments +Required: -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template--spec)) -### `azure_file` +Optional: -#### Arguments +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template--metadata)) -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template.spec` -### `capabilities` +Required: -#### Arguments +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template--spec--resources)) -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities +Optional: -### `ceph_fs` +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. -#### Arguments + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template.spec.resources` -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. +Optional: -### `cinder` +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ -#### Arguments -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template.spec.selector` -### `config_map` +Optional: -#### Arguments +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` -### `config_map_ref` +Optional: -#### Arguments +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined -### `config_map_key_ref` -#### Arguments -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template.metadata` -### `csi` +Optional: -#### Arguments +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -* `driver` - (Required) the name of the volume driver to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_attributes` - (Optional) Attributes of the volume to publish. -* `fs_type` - (Optional) Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. `ext4`, `xfs`, `ntfs`. -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to `true`. If omitted, the default is `false`. -* `node_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -### `dns_config` -#### Arguments -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. + +### Nested Schema for `spec.volume.fc` -The `option` block supports the following: +Required: -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) -### `downward_api` +Optional: -#### Arguments +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. -### `empty_dir` + +### Nested Schema for `spec.volume.flex_volume` -#### Arguments +Required: -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). +- `driver` (String) Driver is the name of the driver to use for this volume. -### `env` +Optional: -#### Arguments +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--volume--flex_volume--secret_ref)) -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value + +### Nested Schema for `spec.volume.flex_volume.secret_ref` -### `env_from` +Optional: -#### Arguments +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from -### `exec` -#### Arguments + +### Nested Schema for `spec.volume.flocker` -* `command` - (Optional) 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. 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. +Optional: -### `fc` +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset -#### Arguments -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) + +### Nested Schema for `spec.volume.gce_persistent_disk` -### `field_ref` +Required: -#### Arguments +- `pd_name` (String) 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 -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version +Optional: -### `flex_volume` +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk -#### Arguments -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. + +### Nested Schema for `spec.volume.git_repo` -### `flocker` +Optional: -#### Arguments +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset -### `gce_persistent_disk` + +### Nested Schema for `spec.volume.glusterfs` -#### Arguments +Required: -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod -### `git_repo` +Optional: -#### Arguments +- `read_only` (Boolean) Whether to 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 -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. -### `glusterfs` + +### Nested Schema for `spec.volume.host_path` -#### Arguments +Optional: -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice -### `grpc` -#### Arguments + +### Nested Schema for `spec.volume.iscsi` -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. +Required: -### `host_aliases` +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). -#### Arguments +Optional: -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. -### `host_path` -#### Arguments + +### Nested Schema for `spec.volume.local` -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) +Optional: -### `http_get` +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local -#### Arguments -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. + +### Nested Schema for `spec.volume.nfs` -### `http_header` +Required: -#### Arguments +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value +Optional: -### `image_pull_secrets` +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -#### Arguments -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) + +### Nested Schema for `spec.volume.persistent_volume_claim` -### `iscsi` +Optional: -#### Arguments +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). -### `items` + +### Nested Schema for `spec.volume.photon_persistent_disk` -#### Arguments +Required: -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. +- `pd_id` (String) ID that identifies Photon Controller persistent disk -### `lifecycle` +Optional: -#### Arguments +- `fs_type` (String) 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. -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -### `liveness_probe` + +### Nested Schema for `spec.volume.projected` -#### Arguments +Required: -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--volume--projected--sources)) -### `nfs` +Optional: -#### Arguments +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) + +### Nested Schema for `spec.volume.projected.sources` -### `persistent_volume_claim` +Optional: -#### Arguments +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--volume--projected--sources--service_account_token)) -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. + +### Nested Schema for `spec.volume.projected.sources.config_map` -### `photon_persistent_disk` +Optional: -#### Arguments +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk + +### Nested Schema for `spec.volume.projected.sources.config_map.items` -### `port` +Optional: -#### Arguments +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". -### `post_start` -#### Arguments + +### Nested Schema for `spec.volume.projected.sources.downward_api` -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported +Optional: -### `pre_stop` +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--volume--projected--sources--downward_api--items)) -#### Arguments + +### Nested Schema for `spec.volume.projected.sources.downward_api.items` -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported +Required: -### `quobyte` +- `path` (String) 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 '..' -#### Arguments +Optional: -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--volume--projected--sources--downward_api--items--resource_field_ref)) -### `rbd` + +### Nested Schema for `spec.volume.projected.sources.downward_api.items.field_ref` -#### Arguments +Optional: -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version -### `readiness_probe` -#### Arguments + +### Nested Schema for `spec.volume.projected.sources.downward_api.items.resource_field_ref` -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) +Required: -### `resources` +- `container_name` (String) +- `resource` (String) Resource to select -#### Arguments +Optional: -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. +- `divisor` (String) -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. -Please, look at the example below: -```terraform -resources { - limits = {} - requests = {} -} -``` -### `resource_field_ref` + +### Nested Schema for `spec.volume.projected.sources.secret` + +Optional: -#### Arguments +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". + +### Nested Schema for `spec.volume.projected.sources.secret.items` -### `seccomp_profile` +Optional: -#### Attributes +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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` - 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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. -### `se_linux_options` -#### Arguments + +### Nested Schema for `spec.volume.projected.sources.service_account_token` -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. +Required: -### `secret` +- `path` (String) Path specifies a relative path to the mount point of the projected volume. -#### Arguments +Optional: -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). -The `items` block supports the following: -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. -### `secret_ref` -#### Arguments + +### Nested Schema for `spec.volume.quobyte` -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined +Required: -### `secret_key_ref` +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. -#### Arguments +Optional: -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user -### `secret_ref` -#### Arguments + +### Nested Schema for `spec.volume.rbd` -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Required: -### container `security_context` +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it -#### Arguments +Optional: -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. -* `fs_group_change_policy` - 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. +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--volume--rbd--secret_ref)) -##### Sysctl + +### Nested Schema for `spec.volume.rbd.secret_ref` -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. +Optional: -### `capabilities` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. -### pod `security_context` + +### Nested Schema for `spec.volume.secret` -#### Arguments +Optional: -* `fs_group` - (Optional) 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. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets -### `tcp_socket` + +### Nested Schema for `spec.volume.secret.items` -#### Arguments +Optional: -* `port` - (Required) 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. +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -### `toleration` -#### Arguments -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + +### Nested Schema for `spec.volume.vsphere_volume` -### `topology_spread_constraint` +Required: -#### Arguments +- `volume_path` (String) Path that identifies vSphere volume vmdk -* `match_label_keys` - (Optional) Is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both `match_label_keys` and `label_selector`. `match_label_keys` cannot be set when `label_selector` isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against `label_selector`. -* `max_skew` - (Optional) Describes the degree to which pods may be unevenly distributed. Default value is `1`. -* `min_domains` - (Optional) Indicates a minimum number of eligible domains. Must be number greater than `0`. When set, `when_unsatisfiable` must be set to `DoNotSchedule`. -* `node_affinity_policy` - (Optional) Indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Valid values are `Honor` and `Ignore`. When unset, behavior defaults to `Honor`. -* `node_taints_policy` - (Optional) Indicates how we will treat node taints when calculating pod topology spread skew. Valid values are `Honor` and `Ignore`. When unset, behavior defaults to `Ignore`. -* `topology_key` - (Optional) The key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. -* `when_unsatisfiable` - (Optional) Indicates how to deal with a pod if it doesn't satisfy the spread constraint. Valid values are `DoNotSchedule` and `ScheduleAnyway`. Default value is `DoNotSchedule`. -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. +Optional: -### `value_from` +- `fs_type` (String) 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. -#### Arguments -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. -### `projected` -#### Arguments + +### Nested Schema for `timeouts` -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources +Optional: -### `sources` +- `create` (String) +- `delete` (String) -#### Arguments -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). -### `service_account_token` -#### Arguments +## Example Usage + +```terraform +resource "kubernetes_pod" "test" { + metadata { + name = "terraform-example" + } + + spec { + container { + image = "nginx:1.21.6" + name = "example" + + env { + name = "environment" + value = "test" + } -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. + port { + container_port = 80 + } -### `volume` + liveness_probe { + http_get { + path = "/" + port = 80 -#### Arguments + http_header { + name = "X-Custom-Header" + value = "Awesome" + } + } -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `csi` - (Optional) CSI represents storage that is handled by an external CSI driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi) -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine + initial_delay_seconds = 3 + period_seconds = 3 + } + } -### `volume_mount` + dns_config { + nameservers = ["1.1.1.1", "8.8.8.8", "9.9.9.9"] + searches = ["example.com"] -#### Arguments + option { + name = "ndots" + value = 1 + } -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) + option { + name = "use-vc" + } + } -### `vsphere_volume` + dns_policy = "None" + } +} +``` -#### Arguments +terraform version of the [pods/pod-with-node-affinity.yaml](https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/pods/pod-with-node-affinity.yaml) example. -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk +```terraform +resource "kubernetes_pod" "with_node_affinity" { + metadata { + name = "with-node-affinity" + } -### `ephemeral` + spec { + affinity { + node_affinity { + required_during_scheduling_ignored_during_execution { + node_selector_term { + match_expressions { + key = "kubernetes.io/e2e-az-name" + operator = "In" + values = ["e2e-az1", "e2e-az2"] + } + } + } -#### Arguments + preferred_during_scheduling_ignored_during_execution { + weight = 1 -* `volume_claim_template` - (Required) 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. + preference { + match_expressions { + key = "another-node-label-key" + operator = "In" + values = ["another-node-label-value"] + } + } + } + } + } -### `volume_claim_template` + container { + name = "with-node-affinity" + image = "k8s.gcr.io/pause:2.0" + } + } +} +``` -#### Arguments +terraform version of the [pods/pod-with-pod-affinity.yaml](https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/pods/pod-with-pod-affinity.yaml) example. -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. +```terraform +resource "kubernetes_pod" "with_pod_affinity" { + metadata { + name = "with-pod-affinity" + } -### `readiness_gate` + spec { + affinity { + pod_affinity { + required_during_scheduling_ignored_during_execution { + label_selector { + match_expressions { + key = "security" + operator = "In" + values = ["S1"] + } + } -#### Arguments + topology_key = "failure-domain.beta.kubernetes.io/zone" + } + } -* `condition_type` - (Required) refers to a condition in the pod's condition list with matching type. + pod_anti_affinity { + preferred_during_scheduling_ignored_during_execution { + weight = 100 -## Timeouts + pod_affinity_term { + label_selector { + match_expressions { + key = "security" + operator = "In" + values = ["S2"] + } + } -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_pod` resource: + topology_key = "failure-domain.beta.kubernetes.io/zone" + } + } + } + } -* `create` - (Default `5 minutes`) Used for Creating Pods. -* `delete` - (Default `5 minutes`) Used for Destroying Pods. + container { + name = "with-pod-affinity" + image = "k8s.gcr.io/pause:2.0" + } + } +} +``` ## Import diff --git a/docs/resources/pod_disruption_budget.md b/docs/resources/pod_disruption_budget.md index 76522975b4..f25aeb6ad1 100644 --- a/docs/resources/pod_disruption_budget.md +++ b/docs/resources/pod_disruption_budget.md @@ -7,63 +7,86 @@ description: |- # kubernetes_pod_disruption_budget -A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. +A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total. -For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total. + +## Schema -## Example Usage +### Required -```terraform -resource "kubernetes_pod_disruption_budget" "demo" { - metadata { - name = "demo" - } - spec { - max_unavailable = "20%" - selector { - match_labels = { - test = "MyExampleApp" - } - } - } -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard pod disruption budget's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Specification of the desired behavior of the PodDisruptionBudget. (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the pod disruption budget that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the pod disruption budget. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the pod disruption budget, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the pod disruption budget must be unique. -## Argument Reference +Read-Only: -The following arguments are supported: +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this pod disruption budget that can be used by clients to determine when pod disruption budget has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this pod disruption budget. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `metadata` - (Required) Standard resource's metadata. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `spec` - (Required) Spec defines the behavior of a Pod Disruption Budget. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -## Nested Blocks + +### Nested Schema for `spec` -### `metadata` +Required: -#### Arguments +- `selector` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--spec--selector)) -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. +Optional: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `max_unavailable` (String) +- `min_available` (String) -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. + +### Nested Schema for `spec.selector` -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +Optional: -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. -#### Attributes + +### Nested Schema for `spec.selector.match_expressions` -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids +Optional: -### `spec` +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. -#### Arguments -* `max_unavailable` - (Optional) Specifies the number of pods from the selected set that can be unavailable after the eviction. It can be either an absolute number or a percentage. You can specify only one of max_unavailable and min_available in a single Pod Disruption Budget. max_unavailable can only be used to control the eviction of pods that have an associated controller managing them. -* `min_available` - (Optional) Specifies the number of pods from the selected set that must still be available after the eviction, even in the absence of the evicted pod. min_available can be either an absolute number or a percentage. You can specify only one of min_available and max_unavailable in a single Pod Disruption Budget. min_available can only be used to control the eviction of pods that have an associated controller managing them. -* `selector` - (Optional) A label query over controllers (Deployment, ReplicationController, ReplicaSet, or StatefulSet) that the Pod Disruption Budget should be applied to. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + + + + +## Example Usage + +```terraform +resource "kubernetes_pod_disruption_budget" "demo" { + metadata { + name = "demo" + } + spec { + max_unavailable = "20%" + selector { + match_labels = { + test = "MyExampleApp" + } + } + } +} +``` diff --git a/docs/resources/pod_disruption_budget_v1.md b/docs/resources/pod_disruption_budget_v1.md index 0f2850f93c..4eb7c5d3a7 100644 --- a/docs/resources/pod_disruption_budget_v1.md +++ b/docs/resources/pod_disruption_budget_v1.md @@ -7,9 +7,71 @@ description: |- # kubernetes_pod_disruption_budget_v1 -A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. +A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total. + + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard pod disruption budget's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Specification of the desired behavior of the PodDisruptionBudget. (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the pod disruption budget that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the pod disruption budget. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the pod disruption budget, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the pod disruption budget must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this pod disruption budget that can be used by clients to determine when pod disruption budget has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this pod disruption budget. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `selector` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--spec--selector)) + +Optional: + +- `max_unavailable` (String) +- `min_available` (String) + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + -For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total. ## Example Usage @@ -29,41 +91,4 @@ resource "kubernetes_pod_disruption_budget_v1" "demo" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource's metadata. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `spec` - (Required) Spec defines the behavior of a Pod Disruption Budget. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments -* `max_unavailable` - (Optional) Specifies the number of pods from the selected set that can be unavailable after the eviction. It can be either an absolute number or a percentage. You can specify only one of max_unavailable and min_available in a single Pod Disruption Budget. max_unavailable can only be used to control the eviction of pods that have an associated controller managing them. -* `min_available` - (Optional) Specifies the number of pods from the selected set that must still be available after the eviction, even in the absence of the evicted pod. min_available can be either an absolute number or a percentage. You can specify only one of min_available and max_unavailable in a single Pod Disruption Budget. min_available can only be used to control the eviction of pods that have an associated controller managing them. -* `selector` - (Optional) A label query over controllers (Deployment, ReplicationController, ReplicaSet, or StatefulSet) that the Pod Disruption Budget should be applied to. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors diff --git a/docs/resources/pod_security_policy.md b/docs/resources/pod_security_policy.md index 1c036b64ea..59d3bb5db4 100644 --- a/docs/resources/pod_security_policy.md +++ b/docs/resources/pod_security_policy.md @@ -9,6 +9,212 @@ description: |- A Pod Security Policy is a cluster-level resource that controls security sensitive aspects of the pod specification. The PodSecurityPolicy objects define a set of conditions that a pod must run with in order to be accepted into the system, as well as defaults for the related fields. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard podsecuritypolicy's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) spec defines the policy enforced. (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the podsecuritypolicy that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the podsecuritypolicy. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the podsecuritypolicy, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this podsecuritypolicy that can be used by clients to determine when podsecuritypolicy has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this podsecuritypolicy. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `fs_group` (Block List, Min: 1, Max: 1) fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. (see [below for nested schema](#nestedblock--spec--fs_group)) +- `run_as_user` (Block List, Min: 1, Max: 1) runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. (see [below for nested schema](#nestedblock--spec--run_as_user)) +- `supplemental_groups` (Block List, Min: 1, Max: 1) supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. (see [below for nested schema](#nestedblock--spec--supplemental_groups)) + +Optional: + +- `allow_privilege_escalation` (Boolean) allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true. +- `allowed_capabilities` (List of String) allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities. +- `allowed_flex_volumes` (Block List) allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "volumes" field. (see [below for nested schema](#nestedblock--spec--allowed_flex_volumes)) +- `allowed_host_paths` (Block List) allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used. (see [below for nested schema](#nestedblock--spec--allowed_host_paths)) +- `allowed_proc_mount_types` (List of String) AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. +- `allowed_unsafe_sysctls` (List of String) allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection. + +Examples: e.g. "foo/*" allows "foo/bar", "foo/baz", etc. e.g. "foo.*" allows "foo.bar", "foo.baz", etc. + +- `default_add_capabilities` (List of String) defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list. +- `default_allow_privilege_escalation` (Boolean) defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. +- `forbidden_sysctls` (List of String) forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. + +Examples: e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. + +- `host_ipc` (Boolean) hostIPC determines if the policy allows the use of HostIPC in the pod spec. +- `host_network` (Boolean) hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. +- `host_pid` (Boolean) hostPID determines if the policy allows the use of HostPID in the pod spec. +- `host_ports` (Block List) hostPorts determines which host port ranges are allowed to be exposed. (see [below for nested schema](#nestedblock--spec--host_ports)) +- `privileged` (Boolean) privileged determines if a pod can request to be run as privileged. +- `read_only_root_filesystem` (Boolean) readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to. +- `required_drop_capabilities` (List of String) requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. +- `run_as_group` (Block List, Max: 1) RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled. (see [below for nested schema](#nestedblock--spec--run_as_group)) +- `se_linux` (Block List, Max: 1) seLinux is the strategy that will dictate the allowable labels that may be set. (see [below for nested schema](#nestedblock--spec--se_linux)) +- `volumes` (List of String) volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. + + +### Nested Schema for `spec.fs_group` + +Required: + +- `rule` (String) rule is the strategy that will dictate what FSGroup is used in the SecurityContext. + +Optional: + +- `range` (Block List) ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs. (see [below for nested schema](#nestedblock--spec--fs_group--range)) + + +### Nested Schema for `spec.fs_group.range` + +Required: + +- `max` (Number) max is the end of the range, inclusive. +- `min` (Number) min is the start of the range, inclusive. + + + + +### Nested Schema for `spec.run_as_user` + +Required: + +- `rule` (String) rule is the strategy that will dictate the allowable RunAsUser values that may be set. + +Optional: + +- `range` (Block List) ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs. (see [below for nested schema](#nestedblock--spec--run_as_user--range)) + + +### Nested Schema for `spec.run_as_user.range` + +Required: + +- `max` (Number) max is the end of the range, inclusive. +- `min` (Number) min is the start of the range, inclusive. + + + + +### Nested Schema for `spec.supplemental_groups` + +Required: + +- `rule` (String) rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. + +Optional: + +- `range` (Block List) ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs. (see [below for nested schema](#nestedblock--spec--supplemental_groups--range)) + + +### Nested Schema for `spec.supplemental_groups.range` + +Required: + +- `max` (Number) max is the end of the range, inclusive. +- `min` (Number) min is the start of the range, inclusive. + + + + +### Nested Schema for `spec.allowed_flex_volumes` + +Required: + +- `driver` (String) driver is the name of the Flexvolume driver. + + + +### Nested Schema for `spec.allowed_host_paths` + +Required: + +- `path_prefix` (String) pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path. + +Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo` + +Optional: + +- `read_only` (Boolean) when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. + + + +### Nested Schema for `spec.host_ports` + +Required: + +- `max` (Number) max is the end of the range, inclusive. +- `min` (Number) min is the start of the range, inclusive. + + + +### Nested Schema for `spec.run_as_group` + +Required: + +- `rule` (String) rule is the strategy that will dictate the allowable RunAsGroup values that may be set. + +Optional: + +- `range` (Block List) ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs. (see [below for nested schema](#nestedblock--spec--run_as_group--range)) + + +### Nested Schema for `spec.run_as_group.range` + +Required: + +- `max` (Number) max is the end of the range, inclusive. +- `min` (Number) min is the start of the range, inclusive. + + + + +### Nested Schema for `spec.se_linux` + +Required: + +- `rule` (String) rule is the strategy that will dictate the allowable labels that may be set. + +Optional: + +- `se_linux_options` (Block List) seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--se_linux--se_linux_options)) + + +### Nested Schema for `spec.se_linux.se_linux_options` + +Required: + +- `level` (String) +- `role` (String) +- `type` (String) +- `user` (String) + + + + + + ~> NOTE: With the release of Kubernetes v1.25, PodSecurityPolicy has been removed. You can read more information about the removal of PodSecurityPolicy in the [Kubernetes 1.25 release notes](https://kubernetes.io/blog/2022/08/23/kubernetes-v1-25-release/#pod-security-changes). ## Example Usage @@ -60,118 +266,6 @@ resource "kubernetes_pod_security_policy" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Pod Security Policy's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#metadata) -* `spec` - (Required) Spec contains information for locating and communicating with a server. [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Pod Security Policy that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Pod Security Policy. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Pod Security Policy, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Pod Security Policy that can be used by clients to determine when Pod Security Policy has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Pod Security Policy. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `allow_privilege_escalation` - (Optional) determines if a pod can request to allow privilege escalation. If unspecified, defaults to true. -* `allowed_capabilities` - (Optional) a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities. -* [`allowed_flex_volumes`](#allowed_flex_volumes) - (Optional) a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "volumes" field. -* [`allowed_host_paths`](#allowed_host_paths) - (Optional) a white list of allowed host paths. Empty indicates that all host paths may be used. -* `allowed_proc_mount_types` - (Optional) a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. Possible values are `"Default"` or `"Unmasked"` -* `allowed_unsafe_sysctls` - (Optional) a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of allowed sysctls. Single* means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. Examples: "foo/*" allows "foo/bar", "foo/baz", etc. and "foo.*" allows "foo.bar", "foo.baz", etc. -* `default_add_capabilities` - (Optional) the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list. -* `default_allow_privilege_escalation` - (Optional) controls the default setting for whether a process can gain more privileges than its parent process. -* `forbidden_sysctls` - (Optional) forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of forbidden sysctls. Single* means all sysctls are forbidden. -* [`fs_group`](#fs_group) - (Required) the strategy that will dictate what fs group is used by the SecurityContext. -* `host_ipc` - (Optional) determines if the policy allows the use of HostIPC in the pod spec. -* `host_network` - (Optional) determines if the policy allows the use of HostNetwork in the pod spec. -* `host_pid` - (Optional) determines if the policy allows the use of HostPID in the pod spec. -* `host_ports` - (Optional) determines which host port ranges are allowed to be exposed. -* `privileged` - (Optional) determines if a pod can request to be run as privileged. -* `read_only_root_filesystem` - (Optional) when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to. -* `required_drop_capabilities` - (Optional) the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. -* [`run_as_user`](#run_as_user) - (Required) the strategy that will dictate the allowable RunAsUser values that may be set. -* [`run_as_group`](#run_as_group) - (Optional) the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled. -* [`se_linux`](#se_linux) - (Required) the strategy that will dictate the allowable labels that may be set. -* [`supplemental_groups`](#supplemental_groups) - (Required) the strategy that will dictate what supplemental groups are used by the SecurityContext. -* `volumes` - (Optional) a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - -### allowed_flex_volumes - -### Arguments - -* `driver` - (Required) the name of the Flexvolume driver. - -### allowed_host_paths - -### Arguments - -* `path_prefix` - (Required) the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path. Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar`. `/foo` would not allow `/food` or `/etc/foo` -* `read_only` - (Optional) when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. - -### `fs_group` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate what FSGroup is used in the SecurityContext. -* `range` - (Optional) the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs. - -### `run_as_user` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable RunAsUser values that may be set. -* `range` - (Optional) the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs. - -### `run_as_group` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable RunAsGroup values that may be set. -* `range` - (Optional) the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs. - -### `se_linux` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable labels that may be set. -* `se_linux_options` - (Optional) required to run as; required for MustRunAs. For more info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - -### `supplemental_groups` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate what supplemental groups is used in the SecurityContext. -* `range` - (Optional) the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs. - -### `range` - -#### Arguments - -* `min` - (Required) the start of the range, inclusive. -* `max` - (Required) the end of the range, inclusive. - ## Import Pod Security Policy can be imported using its name, e.g. diff --git a/docs/resources/pod_security_policy_v1beta1.md b/docs/resources/pod_security_policy_v1beta1.md index b66f879a1f..9b57a5f5ff 100644 --- a/docs/resources/pod_security_policy_v1beta1.md +++ b/docs/resources/pod_security_policy_v1beta1.md @@ -9,6 +9,212 @@ description: |- A Pod Security Policy is a cluster-level resource that controls security sensitive aspects of the pod specification. The PodSecurityPolicy objects define a set of conditions that a pod must run with in order to be accepted into the system, as well as defaults for the related fields. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard podsecuritypolicy's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) spec defines the policy enforced. (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the podsecuritypolicy that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the podsecuritypolicy. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the podsecuritypolicy, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this podsecuritypolicy that can be used by clients to determine when podsecuritypolicy has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this podsecuritypolicy. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `fs_group` (Block List, Min: 1, Max: 1) fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. (see [below for nested schema](#nestedblock--spec--fs_group)) +- `run_as_user` (Block List, Min: 1, Max: 1) runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. (see [below for nested schema](#nestedblock--spec--run_as_user)) +- `supplemental_groups` (Block List, Min: 1, Max: 1) supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. (see [below for nested schema](#nestedblock--spec--supplemental_groups)) + +Optional: + +- `allow_privilege_escalation` (Boolean) allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true. +- `allowed_capabilities` (List of String) allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities. +- `allowed_flex_volumes` (Block List) allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "volumes" field. (see [below for nested schema](#nestedblock--spec--allowed_flex_volumes)) +- `allowed_host_paths` (Block List) allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used. (see [below for nested schema](#nestedblock--spec--allowed_host_paths)) +- `allowed_proc_mount_types` (List of String) AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. +- `allowed_unsafe_sysctls` (List of String) allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection. + +Examples: e.g. "foo/*" allows "foo/bar", "foo/baz", etc. e.g. "foo.*" allows "foo.bar", "foo.baz", etc. + +- `default_add_capabilities` (List of String) defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list. +- `default_allow_privilege_escalation` (Boolean) defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. +- `forbidden_sysctls` (List of String) forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. + +Examples: e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. + +- `host_ipc` (Boolean) hostIPC determines if the policy allows the use of HostIPC in the pod spec. +- `host_network` (Boolean) hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. +- `host_pid` (Boolean) hostPID determines if the policy allows the use of HostPID in the pod spec. +- `host_ports` (Block List) hostPorts determines which host port ranges are allowed to be exposed. (see [below for nested schema](#nestedblock--spec--host_ports)) +- `privileged` (Boolean) privileged determines if a pod can request to be run as privileged. +- `read_only_root_filesystem` (Boolean) readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to. +- `required_drop_capabilities` (List of String) requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. +- `run_as_group` (Block List, Max: 1) RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled. (see [below for nested schema](#nestedblock--spec--run_as_group)) +- `se_linux` (Block List, Max: 1) seLinux is the strategy that will dictate the allowable labels that may be set. (see [below for nested schema](#nestedblock--spec--se_linux)) +- `volumes` (List of String) volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. + + +### Nested Schema for `spec.fs_group` + +Required: + +- `rule` (String) rule is the strategy that will dictate what FSGroup is used in the SecurityContext. + +Optional: + +- `range` (Block List) ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs. (see [below for nested schema](#nestedblock--spec--fs_group--range)) + + +### Nested Schema for `spec.fs_group.range` + +Required: + +- `max` (Number) max is the end of the range, inclusive. +- `min` (Number) min is the start of the range, inclusive. + + + + +### Nested Schema for `spec.run_as_user` + +Required: + +- `rule` (String) rule is the strategy that will dictate the allowable RunAsUser values that may be set. + +Optional: + +- `range` (Block List) ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs. (see [below for nested schema](#nestedblock--spec--run_as_user--range)) + + +### Nested Schema for `spec.run_as_user.range` + +Required: + +- `max` (Number) max is the end of the range, inclusive. +- `min` (Number) min is the start of the range, inclusive. + + + + +### Nested Schema for `spec.supplemental_groups` + +Required: + +- `rule` (String) rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. + +Optional: + +- `range` (Block List) ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs. (see [below for nested schema](#nestedblock--spec--supplemental_groups--range)) + + +### Nested Schema for `spec.supplemental_groups.range` + +Required: + +- `max` (Number) max is the end of the range, inclusive. +- `min` (Number) min is the start of the range, inclusive. + + + + +### Nested Schema for `spec.allowed_flex_volumes` + +Required: + +- `driver` (String) driver is the name of the Flexvolume driver. + + + +### Nested Schema for `spec.allowed_host_paths` + +Required: + +- `path_prefix` (String) pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path. + +Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo` + +Optional: + +- `read_only` (Boolean) when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. + + + +### Nested Schema for `spec.host_ports` + +Required: + +- `max` (Number) max is the end of the range, inclusive. +- `min` (Number) min is the start of the range, inclusive. + + + +### Nested Schema for `spec.run_as_group` + +Required: + +- `rule` (String) rule is the strategy that will dictate the allowable RunAsGroup values that may be set. + +Optional: + +- `range` (Block List) ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs. (see [below for nested schema](#nestedblock--spec--run_as_group--range)) + + +### Nested Schema for `spec.run_as_group.range` + +Required: + +- `max` (Number) max is the end of the range, inclusive. +- `min` (Number) min is the start of the range, inclusive. + + + + +### Nested Schema for `spec.se_linux` + +Required: + +- `rule` (String) rule is the strategy that will dictate the allowable labels that may be set. + +Optional: + +- `se_linux_options` (Block List) seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--se_linux--se_linux_options)) + + +### Nested Schema for `spec.se_linux.se_linux_options` + +Required: + +- `level` (String) +- `role` (String) +- `type` (String) +- `user` (String) + + + + + + ~> NOTE: With the release of Kubernetes v1.25, PodSecurityPolicy has been removed. You can read more information about the removal of PodSecurityPolicy in the [Kubernetes 1.25 release notes](https://kubernetes.io/blog/2022/08/23/kubernetes-v1-25-release/#pod-security-changes). ## Example Usage @@ -60,118 +266,6 @@ resource "kubernetes_pod_security_policy_v1beta1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Pod Security Policy's metadata. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `spec` - (Required) Spec contains information for locating and communicating with a server. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Pod Security Policy that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Pod Security Policy. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Pod Security Policy, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Pod Security Policy that can be used by clients to determine when Pod Security Policy has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Pod Security Policy. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `allow_privilege_escalation` - (Optional) determines if a pod can request to allow privilege escalation. If unspecified, defaults to true. -* `allowed_capabilities` - (Optional) a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities. -* [`allowed_flex_volumes`](#allowed_flex_volumes) - (Optional) a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "volumes" field. -* [`allowed_host_paths`](#allowed_host_paths) - (Optional) a white list of allowed host paths. Empty indicates that all host paths may be used. -* `allowed_proc_mount_types` - (Optional) a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. Possible values are `"Default"` or `"Unmasked"` -* `allowed_unsafe_sysctls` - (Optional) a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of allowed sysctls. Single* means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. Examples: "foo/*" allows "foo/bar", "foo/baz", etc. and "foo.*" allows "foo.bar", "foo.baz", etc. -* `default_add_capabilities` - (Optional) the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list. -* `default_allow_privilege_escalation` - (Optional) controls the default setting for whether a process can gain more privileges than its parent process. -* `forbidden_sysctls` - (Optional) forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of forbidden sysctls. Single* means all sysctls are forbidden. -* [`fs_group`](#fs_group) - (Required) the strategy that will dictate what fs group is used by the SecurityContext. -* `host_ipc` - (Optional) determines if the policy allows the use of HostIPC in the pod spec. -* `host_network` - (Optional) determines if the policy allows the use of HostNetwork in the pod spec. -* `host_pid` - (Optional) determines if the policy allows the use of HostPID in the pod spec. -* `host_ports` - (Optional) determines which host port ranges are allowed to be exposed. -* `privileged` - (Optional) determines if a pod can request to be run as privileged. -* `read_only_root_filesystem` - (Optional) when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to. -* `required_drop_capabilities` - (Optional) the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. -* [`run_as_user`](#run_as_user) - (Required) the strategy that will dictate the allowable RunAsUser values that may be set. -* [`run_as_group`](#run_as_group) - (Optional) the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled. -* [`se_linux`](#se_linux) - (Required) the strategy that will dictate the allowable labels that may be set. -* [`supplemental_groups`](#supplemental_groups) - (Required) the strategy that will dictate what supplemental groups are used by the SecurityContext. -* `volumes` - (Optional) a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - -### allowed_flex_volumes - -### Arguments - -* `driver` - (Required) the name of the Flexvolume driver. - -### allowed_host_paths - -### Arguments - -* `path_prefix` - (Required) the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path. Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar`. `/foo` would not allow `/food` or `/etc/foo` -* `read_only` - (Optional) when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. - -### `fs_group` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate what FSGroup is used in the SecurityContext. -* `range` - (Optional) the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs. - -### `run_as_user` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable RunAsUser values that may be set. -* `range` - (Optional) the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs. - -### `run_as_group` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable RunAsGroup values that may be set. -* `range` - (Optional) the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs. - -### `se_linux` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable labels that may be set. -* `se_linux_options` - (Optional) required to run as; required for MustRunAs. For more info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - -### `supplemental_groups` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate what supplemental groups is used in the SecurityContext. -* `range` - (Optional) the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs. - -### `range` - -#### Arguments - -* `min` - (Required) the start of the range, inclusive. -* `max` - (Required) the end of the range, inclusive. - ## Import Pod Security Policy can be imported using its name, e.g. diff --git a/docs/resources/pod_v1.md b/docs/resources/pod_v1.md index 7b5bf0b3ee..d9e6b72c67 100644 --- a/docs/resources/pod_v1.md +++ b/docs/resources/pod_v1.md @@ -7,965 +7,2323 @@ description: |- # kubernetes_pod_v1 -A pod is a group of one or more containers, the shared storage for those containers, and options about how to run the containers. Pods are always co-located and co-scheduled, and run in a shared context. +A pod is a group of one or more containers, the shared storage for those containers, and options about how to run the containers. Pods are always co-located and co-scheduled, and run in a shared context. Read more at [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod/) -Read more at [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod/) + +## Schema -## Example Usage +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard pod's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Specification of the desired behavior of the pod. (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `target_state` (List of String) A list of the pod phases that indicate whether it was successfully created. Options: "Pending", "Running", "Succeeded", "Failed", "Unknown". Default: "Running". More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the pod that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the pod. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the pod, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the pod must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this pod that can be used by clients to determine when pod has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--volume)) + + +### Nested Schema for `spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--container--env--value_from)) + + +### Nested Schema for `spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.init_container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.init_container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.init_container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.init_container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.init_container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.init_container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.init_container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.init_container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.init_container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.init_container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.init_container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.init_container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--init_container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.init_container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.init_container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.init_container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.init_container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.init_container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.init_container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.init_container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.init_container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.init_container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.init_container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.os` + +Required: + +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. + + + +### Nested Schema for `spec.readiness_gate` + +Required: + +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. + + + +### Nested Schema for `spec.security_context` + +Optional: + +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--security_context--windows_options)) + + +### Nested Schema for `spec.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + +### Nested Schema for `spec.security_context.sysctl` + +Required: + +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. + + + +### Nested Schema for `spec.security_context.windows_options` + +Optional: + +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. + + + + +### Nested Schema for `spec.toleration` + +Optional: + +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + + + +### Nested Schema for `spec.topology_spread_constraint` -```terraform -resource "kubernetes_pod_v1" "test" { - metadata { - name = "terraform-example" - } +Optional: - spec { - container { - image = "nginx:1.21.6" - name = "example" +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. - env { - name = "environment" - value = "test" - } + +### Nested Schema for `spec.topology_spread_constraint.label_selector` - port { - container_port = 80 - } +Optional: - liveness_probe { - http_get { - path = "/" - port = 80 +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - http_header { - name = "X-Custom-Header" - value = "Awesome" - } - } + +### Nested Schema for `spec.topology_spread_constraint.label_selector.match_expressions` - initial_delay_seconds = 3 - period_seconds = 3 - } - } +Optional: - dns_config { - nameservers = ["1.1.1.1", "8.8.8.8", "9.9.9.9"] - searches = ["example.com"] +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. - option { - name = "ndots" - value = 1 - } - option { - name = "use-vc" - } - } - dns_policy = "None" - } -} -``` -terraform version of the [pods/pod-with-node-affinity.yaml](https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/pods/pod-with-node-affinity.yaml) example. + +### Nested Schema for `spec.volume` -```terraform -resource "kubernetes_pod_v1" "with_node_affinity" { - metadata { - name = "with-node-affinity" - } +Optional: - spec { - affinity { - node_affinity { - required_during_scheduling_ignored_during_execution { - node_selector_term { - match_expressions { - key = "kubernetes.io/e2e-az-name" - operator = "In" - values = ["e2e-az1", "e2e-az2"] - } - } - } +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--volume--vsphere_volume)) - preferred_during_scheduling_ignored_during_execution { - weight = 1 + +### Nested Schema for `spec.volume.aws_elastic_block_store` - preference { - match_expressions { - key = "another-node-label-key" - operator = "In" - values = ["another-node-label-value"] - } - } - } - } - } +Required: - container { - name = "with-node-affinity" - image = "k8s.gcr.io/pause:2.0" - } - } -} -``` +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore -terraform version of the [pods/pod-with-pod-affinity.yaml](https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/pods/pod-with-pod-affinity.yaml) example. +Optional: -```terraform -resource "kubernetes_pod_v1" "with_pod_affinity" { - metadata { - name = "with-pod-affinity" - } +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - spec { - affinity { - pod_affinity { - required_during_scheduling_ignored_during_execution { - label_selector { - match_expressions { - key = "security" - operator = "In" - values = ["S1"] - } - } - topology_key = "failure-domain.beta.kubernetes.io/zone" - } - } + +### Nested Schema for `spec.volume.azure_disk` - pod_anti_affinity { - preferred_during_scheduling_ignored_during_execution { - weight = 100 +Required: - pod_affinity_term { - label_selector { - match_expressions { - key = "security" - operator = "In" - values = ["S2"] - } - } +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage - topology_key = "failure-domain.beta.kubernetes.io/zone" - } - } - } - } +Optional: - container { - name = "with-pod-affinity" - image = "k8s.gcr.io/pause:2.0" - } - } -} -``` +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -## Argument Reference -The following arguments are supported: + +### Nested Schema for `spec.volume.azure_file` -* `metadata` - (Required) Standard pod's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec of the pod owned by the cluster -* `target_state` - (Optional) A list of the pod phases that indicate whether it was successfully created. Options: "Pending", "Running", "Succeeded", "Failed", "Unknown". Default: "Running". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase") +Required: -## Nested Blocks +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name -### `metadata` +Optional: -#### Arguments +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. -* `annotations` - (Optional) An unstructured key value map stored with the pod that may be used to store arbitrary metadata. -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) + +### Nested Schema for `spec.volume.ceph_fs` -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the pod. May match selectors of replication controllers and services. +Required: -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -* `name` - (Optional) Name of the pod, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the pod must be unique. +Optional: -#### Attributes +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this pod that can be used by clients to determine when pod has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) + +### Nested Schema for `spec.volume.ceph_fs.secret_ref` -### `spec` +Optional: -#### Arguments +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true` for Pods. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `os` - (Optional) Specifies the OS of the containers in the pod. -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `scheduler_name` - (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `topology_spread_constraint` - (Optional) Describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) -* `readiness_gate` - (Optional) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True". [More info](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-readiness-gate) -### `affinity` -#### Arguments + +### Nested Schema for `spec.volume.cinder` -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) +Required: -### `node_affinity` +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md -#### Arguments +Optional: -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. -### `required_during_scheduling_ignored_during_execution` + +### Nested Schema for `spec.volume.config_map` -#### Arguments +Optional: -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. -## `node_selector_term` + +### Nested Schema for `spec.volume.config_map.items` -#### Arguments +Optional: -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -* `match_fields` - (Optional) A list of node selector requirements by node's fields. -### `match_expressions` / `match_fields` -#### Arguments + +### Nested Schema for `spec.volume.csi` -* `key` - (Required) The label key that the selector applies to. +Required: -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. +Optional: -### `preferred_during_scheduling_ignored_during_execution` +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. -#### Arguments + +### Nested Schema for `spec.volume.csi.node_publish_secret_ref` -* `preference` - (Required) A node selector term, associated with the corresponding weight. +Optional: -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `preference` -#### Arguments -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. + +### Nested Schema for `spec.volume.downward_api` -* `match_fields` - (Optional) A list of node selector requirements by node's fields. +Optional: -## `match_expressions` / `match_fields` +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--volume--downward_api--items)) -#### Arguments + +### Nested Schema for `spec.volume.downward_api.items` -* `key` - (Required) The label key that the selector applies to. +Required: -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. +Optional: -### `pod_affinity` +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--volume--downward_api--items--resource_field_ref)) -#### Arguments + +### Nested Schema for `spec.volume.downward_api.items.field_ref` -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. +Optional: -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version -### `pod_anti_affinity` -#### Arguments + +### Nested Schema for `spec.volume.downward_api.items.resource_field_ref` -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. +Required: -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. +- `container_name` (String) +- `resource` (String) Resource to select -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) +Optional: -#### Arguments +- `divisor` (String) -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Optional) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. -### `preferred_during_scheduling_ignored_during_execution` -#### Arguments -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. + +### Nested Schema for `spec.volume.empty_dir` -### `os` +Optional: -#### Arguments +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. -* `name` - (Required) Name is the name of the operating system. The currently supported values are `linux` and `windows`. -### `container` + +### Nested Schema for `spec.volume.ephemeral` -#### Arguments +Required: -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) Block(s) of [port](#port)s to expose on the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. May be used multiple times. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `termination_message_policy` - (Optional): Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template)) -### `aws_elastic_block_store` + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template` -#### Arguments +Required: -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template--spec)) -### `azure_disk` +Optional: -#### Arguments +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template--metadata)) -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template.spec` -### `azure_file` +Required: -#### Arguments +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template--spec--resources)) -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name +Optional: -### `capabilities` +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. -#### Arguments + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template.spec.resources` -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities +Optional: -### `ceph_fs` +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ -#### Arguments -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template.spec.selector` -### `cinder` +Optional: -#### Arguments +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` -### `config_map` +Optional: -#### Arguments +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -### `config_map_ref` -#### Arguments -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined + +### Nested Schema for `spec.volume.ephemeral.volume_claim_template.metadata` -### `config_map_key_ref` +Optional: -#### Arguments +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined -### `dns_config` -#### Arguments -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. + +### Nested Schema for `spec.volume.fc` -The `option` block supports the following: +Required: -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) -### `downward_api` +Optional: -#### Arguments +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. -### `empty_dir` + +### Nested Schema for `spec.volume.flex_volume` -#### Arguments +Required: -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). +- `driver` (String) Driver is the name of the driver to use for this volume. -### `env` +Optional: -#### Arguments +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--volume--flex_volume--secret_ref)) -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value + +### Nested Schema for `spec.volume.flex_volume.secret_ref` -### `env_from` +Optional: -#### Arguments +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from -### `exec` -#### Arguments + +### Nested Schema for `spec.volume.flocker` -* `command` - (Optional) 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. 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. +Optional: -### `fc` +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset -#### Arguments -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) + +### Nested Schema for `spec.volume.gce_persistent_disk` -### `field_ref` +Required: -#### Arguments +- `pd_name` (String) 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 -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version +Optional: -### `flex_volume` +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk -#### Arguments -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. + +### Nested Schema for `spec.volume.git_repo` -### `flocker` +Optional: -#### Arguments +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset -### `gce_persistent_disk` + +### Nested Schema for `spec.volume.glusterfs` -#### Arguments +Required: -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod -### `git_repo` +Optional: -#### Arguments +- `read_only` (Boolean) Whether to 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 -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. -### `glusterfs` + +### Nested Schema for `spec.volume.host_path` -#### Arguments +Optional: -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice -### `grpc` -#### Arguments + +### Nested Schema for `spec.volume.iscsi` -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. +Required: -### `host_aliases` +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). -#### Arguments +Optional: -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. -### `host_path` -#### Arguments + +### Nested Schema for `spec.volume.local` -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) +Optional: -### `http_get` +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local -#### Arguments -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. + +### Nested Schema for `spec.volume.nfs` -### `http_header` +Required: -#### Arguments +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value +Optional: -### `image_pull_secrets` +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs -#### Arguments -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) + +### Nested Schema for `spec.volume.persistent_volume_claim` -### `iscsi` +Optional: -#### Arguments +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). -### `items` + +### Nested Schema for `spec.volume.photon_persistent_disk` -#### Arguments +Required: -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. +- `pd_id` (String) ID that identifies Photon Controller persistent disk -### `lifecycle` +Optional: -#### Arguments +- `fs_type` (String) 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. -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -### `liveness_probe` + +### Nested Schema for `spec.volume.projected` -#### Arguments +Required: -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--volume--projected--sources)) -### `nfs` +Optional: -#### Arguments +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) + +### Nested Schema for `spec.volume.projected.sources` -### `persistent_volume_claim` +Optional: -#### Arguments +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--volume--projected--sources--service_account_token)) -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. + +### Nested Schema for `spec.volume.projected.sources.config_map` -### `photon_persistent_disk` +Optional: -#### Arguments +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk + +### Nested Schema for `spec.volume.projected.sources.config_map.items` -### `port` +Optional: -#### Arguments +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". -### `post_start` -#### Arguments + +### Nested Schema for `spec.volume.projected.sources.downward_api` -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported +Optional: -### `pre_stop` +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--volume--projected--sources--downward_api--items)) -#### Arguments + +### Nested Schema for `spec.volume.projected.sources.downward_api.items` -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported +Required: -### `quobyte` +- `path` (String) 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 '..' -#### Arguments +Optional: -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--volume--projected--sources--downward_api--items--resource_field_ref)) -### `rbd` + +### Nested Schema for `spec.volume.projected.sources.downward_api.items.field_ref` -#### Arguments +Optional: -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version -### `readiness_probe` -#### Arguments + +### Nested Schema for `spec.volume.projected.sources.downward_api.items.resource_field_ref` -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) +Required: -### `resources` +- `container_name` (String) +- `resource` (String) Resource to select -#### Arguments +Optional: -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. +- `divisor` (String) -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. -Please, look at the example below: -```terraform -resources { - limits = {} - requests = {} -} -``` -### `resource_field_ref` + +### Nested Schema for `spec.volume.projected.sources.secret` + +Optional: -#### Arguments +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". + +### Nested Schema for `spec.volume.projected.sources.secret.items` -### `seccomp_profile` +Optional: -#### Attributes +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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` - 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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. -### `se_linux_options` -#### Arguments + +### Nested Schema for `spec.volume.projected.sources.service_account_token` -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. +Required: -### `secret` +- `path` (String) Path specifies a relative path to the mount point of the projected volume. -#### Arguments +Optional: -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). -The `items` block supports the following: -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. -### `secret_ref` -#### Arguments + +### Nested Schema for `spec.volume.quobyte` -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined +Required: -### `secret_key_ref` +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. -#### Arguments +Optional: -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user -### `secret_ref` -#### Arguments + +### Nested Schema for `spec.volume.rbd` -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Required: -### container `security_context` +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it -#### Arguments +Optional: -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--volume--rbd--secret_ref)) -##### Sysctl + +### Nested Schema for `spec.volume.rbd.secret_ref` -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. +Optional: -### `capabilities` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. -### pod `security_context` + +### Nested Schema for `spec.volume.secret` -#### Arguments +Optional: -* `fs_group` - (Optional) 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. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets -### `tcp_socket` + +### Nested Schema for `spec.volume.secret.items` -#### Arguments +Optional: -* `port` - (Required) 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. +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. -### `toleration` -#### Arguments -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + +### Nested Schema for `spec.volume.vsphere_volume` -### `topology_spread_constraint` +Required: -#### Arguments +- `volume_path` (String) Path that identifies vSphere volume vmdk -* `match_label_keys` - (Optional) Is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both `match_label_keys` and `label_selector`. `match_label_keys` cannot be set when `label_selector` isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against `label_selector`. -* `max_skew` - (Optional) Describes the degree to which pods may be unevenly distributed. Default value is `1`. -* `min_domains` - (Optional) Indicates a minimum number of eligible domains. Must be number greater than `0`. When set, `when_unsatisfiable` must be set to `DoNotSchedule`. -* `node_affinity_policy` - (Optional) Indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Valid values are `Honor` and `Ignore`. When unset, behavior defaults to `Honor`. -* `node_taints_policy` - (Optional) Indicates how we will treat node taints when calculating pod topology spread skew. Valid values are `Honor` and `Ignore`. When unset, behavior defaults to `Ignore`. -* `topology_key` - (Optional) The key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. -* `when_unsatisfiable` - (Optional) Indicates how to deal with a pod if it doesn't satisfy the spread constraint. Valid values are `DoNotSchedule` and `ScheduleAnyway`. Default value is `DoNotSchedule`. -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. +Optional: -### `value_from` +- `fs_type` (String) 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. -#### Arguments -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. -### `projected` -#### Arguments + +### Nested Schema for `timeouts` -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources +Optional: -### `sources` +- `create` (String) +- `delete` (String) -#### Arguments -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). -### `service_account_token` -#### Arguments +## Example Usage + +```terraform +resource "kubernetes_pod_v1" "test" { + metadata { + name = "terraform-example" + } + + spec { + container { + image = "nginx:1.21.6" + name = "example" + + env { + name = "environment" + value = "test" + } -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. + port { + container_port = 80 + } -### `volume` + liveness_probe { + http_get { + path = "/" + port = 80 -#### Arguments + http_header { + name = "X-Custom-Header" + value = "Awesome" + } + } -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine + initial_delay_seconds = 3 + period_seconds = 3 + } + } -### `volume_mount` + dns_config { + nameservers = ["1.1.1.1", "8.8.8.8", "9.9.9.9"] + searches = ["example.com"] -#### Arguments + option { + name = "ndots" + value = 1 + } -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) + option { + name = "use-vc" + } + } -### `vsphere_volume` + dns_policy = "None" + } +} +``` -#### Arguments +terraform version of the [pods/pod-with-node-affinity.yaml](https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/pods/pod-with-node-affinity.yaml) example. -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk +```terraform +resource "kubernetes_pod_v1" "with_node_affinity" { + metadata { + name = "with-node-affinity" + } -### `ephemeral` + spec { + affinity { + node_affinity { + required_during_scheduling_ignored_during_execution { + node_selector_term { + match_expressions { + key = "kubernetes.io/e2e-az-name" + operator = "In" + values = ["e2e-az1", "e2e-az2"] + } + } + } -#### Arguments + preferred_during_scheduling_ignored_during_execution { + weight = 1 -* `volume_claim_template` - (Required) 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. + preference { + match_expressions { + key = "another-node-label-key" + operator = "In" + values = ["another-node-label-value"] + } + } + } + } + } -### `volume_claim_template` + container { + name = "with-node-affinity" + image = "k8s.gcr.io/pause:2.0" + } + } +} +``` -#### Arguments +terraform version of the [pods/pod-with-pod-affinity.yaml](https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/pods/pod-with-pod-affinity.yaml) example. -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. +```terraform +resource "kubernetes_pod_v1" "with_pod_affinity" { + metadata { + name = "with-pod-affinity" + } -### `readiness_gate` + spec { + affinity { + pod_affinity { + required_during_scheduling_ignored_during_execution { + label_selector { + match_expressions { + key = "security" + operator = "In" + values = ["S1"] + } + } -#### Arguments + topology_key = "failure-domain.beta.kubernetes.io/zone" + } + } -* `condition_type` - (Required) refers to a condition in the pod's condition list with matching type. + pod_anti_affinity { + preferred_during_scheduling_ignored_during_execution { + weight = 100 -## Timeouts + pod_affinity_term { + label_selector { + match_expressions { + key = "security" + operator = "In" + values = ["S2"] + } + } -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_pod_v1` resource: + topology_key = "failure-domain.beta.kubernetes.io/zone" + } + } + } + } -* `create` - (Default `5 minutes`) Used for Creating Pods. -* `delete` - (Default `5 minutes`) Used for Destroying Pods. + container { + name = "with-pod-affinity" + image = "k8s.gcr.io/pause:2.0" + } + } +} +``` ## Import diff --git a/docs/resources/priority_class.md b/docs/resources/priority_class.md index 7cd287f262..bb98be660e 100644 --- a/docs/resources/priority_class.md +++ b/docs/resources/priority_class.md @@ -9,49 +9,54 @@ description: |- A PriorityClass is a non-namespaced object that defines a mapping from a priority class name to the integer value of the priority. -## Example Usage + +## Schema -```terraform -resource "kubernetes_priority_class" "example" { - metadata { - name = "terraform-example" - } +### Required - value = 100 -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard priority class's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `value` (Number) The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec. + +### Optional -## Argument Reference +- `description` (String) An arbitrary string that usually provides guidelines on when this priority class should be used. +- `global_default` (Boolean) Specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority. +- `preemption_policy` (String) PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. -The following arguments are supported: +### Read-Only -* `metadata` - (Required) Standard resource quota's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `value` - (Required, Forces new resource) The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec. -* `description` - (Optional) An arbitrary string that usually provides guidelines on when this priority class should be used. -* `global_default` - (Optional) Boolean that specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. -* `preemption_policy` - (Optional) PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. +- `id` (String) The ID of this resource. -## Nested Blocks + +### Nested Schema for `metadata` -### `metadata` +Optional: -#### Arguments +- `annotations` (Map of String) An unstructured key value map stored with the priority class that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the priority class. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the priority class, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `annotations` - (Optional) An unstructured key value map stored with the resource quota that may be used to store arbitrary metadata. +Read-Only: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this priority class that can be used by clients to determine when priority class has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this priority class. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the resource quota. May match selectors of replication controllers and services. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) -* `name` - (Optional) Name of the resource quota, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -#### Attributes +## Example Usage + +```terraform +resource "kubernetes_priority_class" "example" { + metadata { + name = "terraform-example" + } -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this resource quota that can be used by clients to determine when resource quota has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this resource quota. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) + value = 100 +} +``` ## Import diff --git a/docs/resources/priority_class_v1.md b/docs/resources/priority_class_v1.md index 13f1997f6b..467ad82374 100644 --- a/docs/resources/priority_class_v1.md +++ b/docs/resources/priority_class_v1.md @@ -9,50 +9,54 @@ description: |- A PriorityClass is a non-namespaced object that defines a mapping from a priority class name to the integer value of the priority. -## Example Usage + +## Schema -```terraform -resource "kubernetes_priority_class_v1" "example" { - metadata { - name = "terraform-example" - } +### Required - value = 100 -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard priority class's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `value` (Number) The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec. + +### Optional -## Argument Reference +- `description` (String) An arbitrary string that usually provides guidelines on when this priority class should be used. +- `global_default` (Boolean) Specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority. +- `preemption_policy` (String) PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. -The following arguments are supported: +### Read-Only -* `metadata` - (Required) Standard resource quota's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `value` - (Required, Forces new resource) The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec. -* `description` - (Optional) An arbitrary string that usually provides guidelines on when this priority class should be used. -* `global_default` - (Optional) Boolean that specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. -* `preemption_policy` - (Optional) PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. +- `id` (String) The ID of this resource. -## Nested Blocks + +### Nested Schema for `metadata` -### `metadata` +Optional: -#### Arguments +- `annotations` (Map of String) An unstructured key value map stored with the priority class that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the priority class. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the priority class, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `annotations` - (Optional) An unstructured key value map stored with the resource quota that may be used to store arbitrary metadata. +Read-Only: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this priority class that can be used by clients to determine when priority class has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this priority class. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the resource quota. May match selectors of replication controllers and services. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) -* `name` - (Optional) Name of the resource quota, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -#### Attributes +## Example Usage + +```terraform +resource "kubernetes_priority_class_v1" "example" { + metadata { + name = "terraform-example" + } -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this resource quota that can be used by clients to determine when resource quota has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this resource quota. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) -* `preemption_policy` - PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. + value = 100 +} +``` ## Import diff --git a/docs/resources/replication_controller.md b/docs/resources/replication_controller.md index 48350fab33..f4d766cbd1 100644 --- a/docs/resources/replication_controller.md +++ b/docs/resources/replication_controller.md @@ -11,6 +11,2212 @@ A Replication Controller ensures that a specified number of pod “replicas” a ~> **WARNING:** In many cases it is recommended to create a Deployment instead of a Replication Controller. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard replication controller's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the replication controller that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the replication controller. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the replication controller, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the replication controller must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this replication controller that can be used by clients to determine when replication controller has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this replication controller. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `selector` (Map of String) A label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors +- `template` (Block List, Min: 1, Max: 1) Describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template (see [below for nested schema](#nestedblock--spec--template)) + +Optional: + +- `min_ready_seconds` (Number) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) +- `replicas` (Number) The number of desired replicas. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller + + +### Nested Schema for `spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard replication controller's template's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--template--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec of the pods managed by the replication controller (see [below for nested schema](#nestedblock--spec--template--spec)) + + +### Nested Schema for `spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the replication controller's template that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the replication controller's template. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the replication controller's template, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the replication controller's template must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this replication controller's template that can be used by clients to determine when replication controller's template has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this replication controller's template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume)) + + +### Nested Schema for `spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.init_container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.init_container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.init_container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.init_container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.os` + +Required: + +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. + + + +### Nested Schema for `spec.template.spec.readiness_gate` + +Required: + +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. + + + +### Nested Schema for `spec.template.spec.security_context` + +Optional: + +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--windows_options)) + + +### Nested Schema for `spec.template.spec.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + +### Nested Schema for `spec.template.spec.security_context.sysctl` + +Required: + +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. + + + +### Nested Schema for `spec.template.spec.security_context.windows_options` + +Optional: + +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. + + + + +### Nested Schema for `spec.template.spec.toleration` + +Optional: + +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + + + +### Nested Schema for `spec.template.spec.topology_spread_constraint` + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume` + +Optional: + +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--vsphere_volume)) + + +### Nested Schema for `spec.template.spec.volume.aws_elastic_block_store` + +Required: + +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + +### Nested Schema for `spec.template.spec.volume.azure_disk` + +Required: + +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage + +Optional: + +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.azure_file` + +Required: + +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name + +Optional: + +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. + + + +### Nested Schema for `spec.template.spec.volume.ceph_fs` + +Required: + +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +Optional: + +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + +### Nested Schema for `spec.template.spec.volume.ceph_fs.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.cinder` + +Required: + +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +Optional: + +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + +### Nested Schema for `spec.template.spec.volume.config_map` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.csi` + +Required: + +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi + +Optional: + +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. + + +### Nested Schema for `spec.template.spec.volume.csi.node_publish_secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.downward_api` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items` + +Required: + +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' + +Optional: + +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.empty_dir` + +Optional: + +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice + + + +### Nested Schema for `spec.template.spec.volume.iscsi` + +Required: + +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). + +Optional: + +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. + + + +### Nested Schema for `spec.template.spec.volume.local` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local + + + +### Nested Schema for `spec.template.spec.volume.nfs` + +Required: + +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + +Optional: + +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + + + +### Nested Schema for `spec.template.spec.volume.persistent_volume_claim` + +Optional: + +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. + + + +### Nested Schema for `spec.template.spec.volume.photon_persistent_disk` + +Required: + +- `pd_id` (String) ID that identifies Photon Controller persistent disk + +Optional: + +- `fs_type` (String) 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. + + + +### Nested Schema for `spec.template.spec.volume.projected` + +Required: + +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources)) + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. + + +### Nested Schema for `spec.template.spec.volume.projected.sources` + +Optional: + +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--service_account_token)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map` + +Optional: + +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api` + +Optional: + +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items` + +Required: + +- `path` (String) 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 '..' + +Optional: + +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret` + +Optional: + +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `update` (String) + + + + ## Example Usage ```terraform @@ -73,88 +2279,6 @@ resource "kubernetes_replication_controller" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard replication controller's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the replication controller. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the replication controller that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the replication controller. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the replication controller, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the replication controller must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this replication controller that can be used by clients to determine when replication controller has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this replication controller. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `replicas` - (Optional) The number of desired replicas. Defaults to 1. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller) -* `selector` - (Required) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this replication controller. **Should match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions) -* `template` - (Required) Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template) - -## Nested Blocks - -### `spec.template` - -#### Arguments - -* `metadata` - (Optional) Standard object's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). While required by the kubernetes API, this field is marked as optional to allow the usage of the deprecated pod spec fields that were mistakenly placed directly under the `template` block. - -* `spec` - (Optional) Specification of the desired behavior of the pod. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -~> **NOTE:** all the fields from the `spec.template.spec` block are also accepted at the `spec.template` level but that usage is deprecated. All existing configurations should be updated to only use the new fields under `spec.template.spec`. Mixing the usage of deprecated fields with new fields is not supported. - -## Nested Blocks - -### `spec.template.metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the replication controller that may be used to store arbitrary metadata. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the pods managed by this replication controller . **Should match `selector`**. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions) -* `name` - (Optional) Name of the replication controller, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the replication controller must be unique. - -## Nested Blocks - -### `spec.template.spec` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available: - -- `create` - (Default `10 minutes`) Used for creating new controller -- `update` - (Default `10 minutes`) Used for updating a controller -- `delete` - (Default `10 minutes`) Used for destroying a controller - ## Import Replication Controller can be imported using the namespace and name, e.g. diff --git a/docs/resources/replication_controller_v1.md b/docs/resources/replication_controller_v1.md index 914c0335d1..10dafd5fe8 100644 --- a/docs/resources/replication_controller_v1.md +++ b/docs/resources/replication_controller_v1.md @@ -9,6 +9,2212 @@ description: |- A Replication Controller ensures that a specified number of pod “replicas” are running at any one time. In other words, a Replication Controller makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Replication Controller will start more. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard replication controller's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the replication controller that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the replication controller. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the replication controller, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the replication controller must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this replication controller that can be used by clients to determine when replication controller has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this replication controller. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `selector` (Map of String) A label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors +- `template` (Block List, Min: 1, Max: 1) Describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template (see [below for nested schema](#nestedblock--spec--template)) + +Optional: + +- `min_ready_seconds` (Number) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) +- `replicas` (Number) The number of desired replicas. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller + + +### Nested Schema for `spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard replication controller's template's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--template--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec of the pods managed by the replication controller (see [below for nested schema](#nestedblock--spec--template--spec)) + + +### Nested Schema for `spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the replication controller's template that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the replication controller's template. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the replication controller's template, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the replication controller's template must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this replication controller's template that can be used by clients to determine when replication controller's template has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this replication controller's template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume)) + + +### Nested Schema for `spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.init_container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.init_container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.init_container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.init_container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.os` + +Required: + +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. + + + +### Nested Schema for `spec.template.spec.readiness_gate` + +Required: + +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. + + + +### Nested Schema for `spec.template.spec.security_context` + +Optional: + +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--windows_options)) + + +### Nested Schema for `spec.template.spec.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + +### Nested Schema for `spec.template.spec.security_context.sysctl` + +Required: + +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. + + + +### Nested Schema for `spec.template.spec.security_context.windows_options` + +Optional: + +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. + + + + +### Nested Schema for `spec.template.spec.toleration` + +Optional: + +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + + + +### Nested Schema for `spec.template.spec.topology_spread_constraint` + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume` + +Optional: + +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--vsphere_volume)) + + +### Nested Schema for `spec.template.spec.volume.aws_elastic_block_store` + +Required: + +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + +### Nested Schema for `spec.template.spec.volume.azure_disk` + +Required: + +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage + +Optional: + +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.azure_file` + +Required: + +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name + +Optional: + +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. + + + +### Nested Schema for `spec.template.spec.volume.ceph_fs` + +Required: + +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +Optional: + +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + +### Nested Schema for `spec.template.spec.volume.ceph_fs.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.cinder` + +Required: + +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +Optional: + +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + +### Nested Schema for `spec.template.spec.volume.config_map` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.csi` + +Required: + +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi + +Optional: + +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. + + +### Nested Schema for `spec.template.spec.volume.csi.node_publish_secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.downward_api` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items` + +Required: + +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' + +Optional: + +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.empty_dir` + +Optional: + +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice + + + +### Nested Schema for `spec.template.spec.volume.iscsi` + +Required: + +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). + +Optional: + +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. + + + +### Nested Schema for `spec.template.spec.volume.local` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local + + + +### Nested Schema for `spec.template.spec.volume.nfs` + +Required: + +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + +Optional: + +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + + + +### Nested Schema for `spec.template.spec.volume.persistent_volume_claim` + +Optional: + +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. + + + +### Nested Schema for `spec.template.spec.volume.photon_persistent_disk` + +Required: + +- `pd_id` (String) ID that identifies Photon Controller persistent disk + +Optional: + +- `fs_type` (String) 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. + + + +### Nested Schema for `spec.template.spec.volume.projected` + +Required: + +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources)) + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. + + +### Nested Schema for `spec.template.spec.volume.projected.sources` + +Optional: + +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--service_account_token)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map` + +Optional: + +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api` + +Optional: + +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items` + +Required: + +- `path` (String) 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 '..' + +Optional: + +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret` + +Optional: + +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `update` (String) + + + + ~> **WARNING:** In many cases it is recommended to create a Deployment instead of a Replication Controller. ## Example Usage @@ -73,88 +2279,6 @@ resource "kubernetes_replication_controller_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard replication controller's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the replication controller. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the replication controller that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the replication controller. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the replication controller, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the replication controller must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this replication controller that can be used by clients to determine when replication controller has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this replication controller. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `replicas` - (Optional) The number of desired replicas. Defaults to 1. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller) -* `selector` - (Required) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this replication controller. **Should match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions) -* `template` - (Required) Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template) - -## Nested Blocks - -### `spec.template` - -#### Arguments - -* `metadata` - (Optional) Standard object's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). While required by the kubernetes API, this field is marked as optional to allow the usage of the deprecated pod spec fields that were mistakenly placed directly under the `template` block. - -* `spec` - (Optional) Specification of the desired behavior of the pod. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -~> **NOTE:** all the fields from the `spec.template.spec` block are also accepted at the `spec.template` level but that usage is deprecated. All existing configurations should be updated to only use the new fields under `spec.template.spec`. Mixing the usage of deprecated fields with new fields is not supported. - -## Nested Blocks - -### `spec.template.metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the replication controller that may be used to store arbitrary metadata. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the pods managed by this replication controller . **Should match `selector`**. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions) -* `name` - (Optional) Name of the replication controller, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the replication controller must be unique. - -## Nested Blocks - -### `spec.template.spec` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available: - -- `create` - (Default `10 minutes`) Used for creating new controller -- `update` - (Default `10 minutes`) Used for updating a controller -- `delete` - (Default `10 minutes`) Used for destroying a controller - ## Import Replication Controller can be imported using the namespace and name, e.g. diff --git a/docs/resources/resource_quota.md b/docs/resources/resource_quota.md index bb26e60a19..43632bb474 100644 --- a/docs/resources/resource_quota.md +++ b/docs/resources/resource_quota.md @@ -9,73 +9,97 @@ description: |- A resource quota provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that project. -## Example Usage + +## Schema -```terraform -resource "kubernetes_resource_quota" "example" { - metadata { - name = "terraform-example" - } - spec { - hard = { - pods = 10 - } - scopes = ["BestEffort"] - } -} -``` +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard resource quota's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `spec` (Block List, Max: 1) Spec defines the desired quota. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` -## Argument Reference +Optional: -The following arguments are supported: +- `annotations` (Map of String) An unstructured key value map stored with the resource quota that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resource quota. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the resource quota, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the resource quota must be unique. -* `metadata` - (Required) Standard resource quota's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Optional) Spec defines the desired quota. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) +Read-Only: -## Nested Blocks +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this resource quota that can be used by clients to determine when resource quota has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this resource quota. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -### `metadata` -#### Arguments + +### Nested Schema for `spec` -* `annotations` - (Optional) An unstructured key value map stored with the resource quota that may be used to store arbitrary metadata. +Optional: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `hard` (Map of String) The set of desired hard limits for each named resource. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota +- `scope_selector` (Block List, Max: 1) A collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. (see [below for nested schema](#nestedblock--spec--scope_selector)) +- `scopes` (Set of String) A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the resource quota. May match selectors of replication controllers and services. + +### Nested Schema for `spec.scope_selector` -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +Optional: -* `name` - (Optional) Name of the resource quota, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the resource quota must be unique. +- `match_expression` (Block List) A list of scope selector requirements by scope of the resources. (see [below for nested schema](#nestedblock--spec--scope_selector--match_expression)) -#### Attributes + +### Nested Schema for `spec.scope_selector.match_expression` -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this resource quota that can be used by clients to determine when resource quota has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this resource quota. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +Required: -### `spec` +- `operator` (String) Represents a scope's relationship to a set of values. +- `scope_name` (String) The name of the scope that the selector applies to. -#### Arguments +Optional: -* `hard` - (Optional) The set of desired hard limits for each named resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/policy/resource-quotas) -* `scopes` - (Optional) A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. -* `scope_selector` - (Optional) A collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. See `scope_selector` below for more details. +- `values` (Set of String) A list of scope selector requirements by scope of the resources. -#### `scope_selector` -##### Arguments -* `match_expression` - (Optional) A list of scope selector requirements by scope of the resources. See `match_expression` below for more details. -##### `match_expression` + +### Nested Schema for `timeouts` -###### Arguments +Optional: -* `scope_name` - (Required) The name of the scope that the selector applies to. Valid values are `Terminating`, `NotTerminating`, `BestEffort`, `NotBestEffort`, and `PriorityClass`. -* `operator` - (Required) Represents a scope's relationship to a set of values. Valid operators are `In`, `NotIn`, `Exists`, `DoesNotExist`. -* `values` - (Optional) A list of scope selector requirements by scope of the resources. +- `create` (String) +- `update` (String) + + + + +## Example Usage + +```terraform +resource "kubernetes_resource_quota" "example" { + metadata { + name = "terraform-example" + } + spec { + hard = { + pods = 10 + } + scopes = ["BestEffort"] + } +} +``` ## Import diff --git a/docs/resources/resource_quota_v1.md b/docs/resources/resource_quota_v1.md index cf1f6239ba..f7c9d63a38 100644 --- a/docs/resources/resource_quota_v1.md +++ b/docs/resources/resource_quota_v1.md @@ -9,73 +9,97 @@ description: |- A resource quota provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that project. -## Example Usage + +## Schema -```terraform -resource "kubernetes_resource_quota_v1" "example" { - metadata { - name = "terraform-example" - } - spec { - hard = { - pods = 10 - } - scopes = ["BestEffort"] - } -} -``` +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard resource quota's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `spec` (Block List, Max: 1) Spec defines the desired quota. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` -## Argument Reference +Optional: -The following arguments are supported: +- `annotations` (Map of String) An unstructured key value map stored with the resource quota that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the resource quota. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the resource quota, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the resource quota must be unique. -* `metadata` - (Required) Standard resource quota's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Optional) Spec defines the desired quota. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) +Read-Only: -## Nested Blocks +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this resource quota that can be used by clients to determine when resource quota has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this resource quota. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -### `metadata` -#### Arguments + +### Nested Schema for `spec` -* `annotations` - (Optional) An unstructured key value map stored with the resource quota that may be used to store arbitrary metadata. +Optional: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `hard` (Map of String) The set of desired hard limits for each named resource. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota +- `scope_selector` (Block List, Max: 1) A collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. (see [below for nested schema](#nestedblock--spec--scope_selector)) +- `scopes` (Set of String) A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the resource quota. May match selectors of replication controllers and services. + +### Nested Schema for `spec.scope_selector` -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +Optional: -* `name` - (Optional) Name of the resource quota, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the resource quota must be unique. +- `match_expression` (Block List) A list of scope selector requirements by scope of the resources. (see [below for nested schema](#nestedblock--spec--scope_selector--match_expression)) -#### Attributes + +### Nested Schema for `spec.scope_selector.match_expression` -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this resource quota that can be used by clients to determine when resource quota has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this resource quota. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +Required: -### `spec` +- `operator` (String) Represents a scope's relationship to a set of values. +- `scope_name` (String) The name of the scope that the selector applies to. -#### Arguments +Optional: -* `hard` - (Optional) The set of desired hard limits for each named resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/policy/resource-quotas) -* `scopes` - (Optional) A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. -* `scope_selector` - (Optional) A collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. See `scope_selector` below for more details. +- `values` (Set of String) A list of scope selector requirements by scope of the resources. -#### `scope_selector` -##### Arguments -* `match_expression` - (Optional) A list of scope selector requirements by scope of the resources. See `match_expression` below for more details. -##### `match_expression` + +### Nested Schema for `timeouts` -###### Arguments +Optional: -* `scope_name` - (Required) The name of the scope that the selector applies to. Valid values are `Terminating`, `NotTerminating`, `BestEffort`, `NotBestEffort`, and `PriorityClass`. -* `operator` - (Required) Represents a scope's relationship to a set of values. Valid operators are `In`, `NotIn`, `Exists`, `DoesNotExist`. -* `values` - (Optional) A list of scope selector requirements by scope of the resources. +- `create` (String) +- `update` (String) + + + + +## Example Usage + +```terraform +resource "kubernetes_resource_quota_v1" "example" { + metadata { + name = "terraform-example" + } + spec { + hard = { + pods = 10 + } + scopes = ["BestEffort"] + } +} +``` ## Import diff --git a/docs/resources/role.md b/docs/resources/role.md index c0fb851459..1a7ecd611c 100644 --- a/docs/resources/role.md +++ b/docs/resources/role.md @@ -9,6 +9,52 @@ description: |- A role contains rules that represent a set of permissions. Permissions are purely additive (there are no “deny” rules). + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard role's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `rule` (Block List, Min: 1) Rule defining a set of permissions for the role (see [below for nested schema](#nestedblock--rule)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the role that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the role. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the role, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the role must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this role that can be used by clients to determine when role has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this role. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `rule` + +Required: + +- `api_groups` (Set of String) Name of the APIGroup that contains the resources +- `resources` (Set of String) List of resources that the rule applies to +- `verbs` (Set of String) List of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule + +Optional: + +- `resource_names` (Set of String) White list of names that the rule applies to + + + + ## Example Usage ```terraform @@ -34,46 +80,6 @@ resource "kubernetes_role" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard role's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `rule` - (Required) List of rules that define the set of permissions for this role. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](hhttps://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the role must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this role that can be used by clients to determine when role has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this role. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `rule` - -#### Arguments - -* `api_groups` - (Required) List of APIGroups that contains the resources. -* `resources` - (Required) List of resources that the rule applies to. -* `resource_names` - (Optional) White list of names that the rule applies to. -* `verbs` - (Required) List of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. - ## Import Role can be imported using the namespace and name, e.g. diff --git a/docs/resources/role_binding.md b/docs/resources/role_binding.md index 18d69276ac..ab52884e7f 100644 --- a/docs/resources/role_binding.md +++ b/docs/resources/role_binding.md @@ -5,7 +5,64 @@ description: |- A RoleBinding may be used to grant permission at the namespace level. --- -# kubernetes_role_binding +# kubernetes_role_binding + + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard roleBinding's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `role_ref` (Block List, Min: 1, Max: 1) RoleRef references the Role for this binding (see [below for nested schema](#nestedblock--role_ref)) +- `subject` (Block List, Min: 1) Subjects defines the entities to bind a Role to. (see [below for nested schema](#nestedblock--subject)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the roleBinding that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the roleBinding. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the roleBinding, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the roleBinding must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this roleBinding that can be used by clients to determine when roleBinding has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this roleBinding. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `role_ref` + +Required: + +- `api_group` (String) The API group of the user. The only value possible at the moment is `rbac.authorization.k8s.io`. +- `kind` (String) The kind of resource. +- `name` (String) The name of the User to bind to. + + + +### Nested Schema for `subject` + +Required: + +- `kind` (String) The kind of resource. +- `name` (String) The name of the resource to bind to. + +Optional: + +- `api_group` (String) The API group of the subject resource. +- `namespace` (String) The Namespace of the subject resource. + + + A RoleBinding may be used to grant permission at the namespace level @@ -40,55 +97,6 @@ resource "kubernetes_role_binding" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `role_ref` - (Required) The Role to bind Subjects to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) -* `subject` - (Required) The Users, Groups, or ServiceAccounts to grand permissions to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-subjects) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the role binding must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `role_ref` - -#### Arguments - -* `name` - (Required) The name of this Role to bind Subjects to. -* `kind` - (Required) The type of binding to use. This value must be present and defaults to `Role` -* `api_group` - (Required) The API group to drive authorization decisions. This value must be and defaults to `rbac.authorization.k8s.io` - -### `subject` - -#### Arguments - -* `name` - (Required) The name of this Role to bind Subjects to. -* `namespace` - (Optional) Namespace defines the namespace of the ServiceAccount to bind to. This value only applies to kind `ServiceAccount` -* `kind` - (Required) The type of binding to use. This value must be `ServiceAccount`, `User` or `Group` -* `api_group` - (Required) The API group to drive authorization decisions. This value only applies to kind `User` and `Group`. It must be `rbac.authorization.k8s.io` - ## Import RoleBinding can be imported using the name, e.g. diff --git a/docs/resources/role_binding_v1.md b/docs/resources/role_binding_v1.md index 704994651b..20ee650028 100644 --- a/docs/resources/role_binding_v1.md +++ b/docs/resources/role_binding_v1.md @@ -9,6 +9,63 @@ description: |- A RoleBinding may be used to grant permission at the namespace level + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard roleBinding's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `role_ref` (Block List, Min: 1, Max: 1) RoleRef references the Role for this binding (see [below for nested schema](#nestedblock--role_ref)) +- `subject` (Block List, Min: 1) Subjects defines the entities to bind a Role to. (see [below for nested schema](#nestedblock--subject)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the roleBinding that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the roleBinding. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the roleBinding, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the roleBinding must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this roleBinding that can be used by clients to determine when roleBinding has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this roleBinding. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `role_ref` + +Required: + +- `api_group` (String) The API group of the user. The only value possible at the moment is `rbac.authorization.k8s.io`. +- `kind` (String) The kind of resource. +- `name` (String) The name of the User to bind to. + + + +### Nested Schema for `subject` + +Required: + +- `kind` (String) The kind of resource. +- `name` (String) The name of the resource to bind to. + +Optional: + +- `api_group` (String) The API group of the subject resource. +- `namespace` (String) The Namespace of the subject resource. + + + + ## Example Usage ```terraform @@ -40,55 +97,6 @@ resource "kubernetes_role_binding_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `role_ref` - (Required) The Role to bind Subjects to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) -* `subject` - (Required) The Users, Groups, or ServiceAccounts to grand permissions to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-subjects) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the role binding must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `role_ref` - -#### Arguments - -* `name` - (Required) The name of this Role to bind Subjects to. -* `kind` - (Required) The type of binding to use. This value must be present and defaults to `Role` -* `api_group` - (Required) The API group to drive authorization decisions. This value must be and defaults to `rbac.authorization.k8s.io` - -### `subject` - -#### Arguments - -* `name` - (Required) The name of this Role to bind Subjects to. -* `namespace` - (Optional) Namespace defines the namespace of the ServiceAccount to bind to. This value only applies to kind `ServiceAccount` -* `kind` - (Required) The type of binding to use. This value must be `ServiceAccount`, `User` or `Group` -* `api_group` - (Required) The API group to drive authorization decisions. This value only applies to kind `User` and `Group`. It must be `rbac.authorization.k8s.io` - ## Import RoleBinding can be imported using the name, e.g. diff --git a/docs/resources/role_v1.md b/docs/resources/role_v1.md index 70ecbe1fb0..aeb433d449 100644 --- a/docs/resources/role_v1.md +++ b/docs/resources/role_v1.md @@ -9,6 +9,52 @@ description: |- A role contains rules that represent a set of permissions. Permissions are purely additive (there are no “deny” rules). + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard role's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `rule` (Block List, Min: 1) Rule defining a set of permissions for the role (see [below for nested schema](#nestedblock--rule)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the role that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the role. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the role, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the role must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this role that can be used by clients to determine when role has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this role. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `rule` + +Required: + +- `api_groups` (Set of String) Name of the APIGroup that contains the resources +- `resources` (Set of String) List of resources that the rule applies to +- `verbs` (Set of String) List of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule + +Optional: + +- `resource_names` (Set of String) White list of names that the rule applies to + + + + ## Example Usage ```terraform @@ -34,46 +80,6 @@ resource "kubernetes_role_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard role's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `rule` - (Required) List of rules that define the set of permissions for this role. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](hhttps://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the role must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this role that can be used by clients to determine when role has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this role. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `rule` - -#### Arguments - -* `api_groups` - (Required) List of APIGroups that contains the resources. -* `resources` - (Required) List of resources that the rule applies to. -* `resource_names` - (Optional) White list of names that the rule applies to. -* `verbs` - (Required) List of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. - ## Import Role can be imported using the namespace and name, e.g. diff --git a/docs/resources/runtime_class_v1.md b/docs/resources/runtime_class_v1.md index dfbe0875f3..5e091ae917 100644 --- a/docs/resources/runtime_class_v1.md +++ b/docs/resources/runtime_class_v1.md @@ -9,46 +9,47 @@ description: |- A runtime class is used to determine which container runtime is used to run all containers in a pod. -## Example usage + +## Schema -```terraform -resource "kubernetes_runtime_class_v1" "example" { - metadata { - name = "myclass" - } - handler = "abcdeagh" -} -``` +### Required -## Argument Reference +- `handler` (String) Specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class +- `metadata` (Block List, Min: 1, Max: 1) Standard runtimeclass's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) -The following arguments are supported: +### Read-Only -* `metadata` - (Required) Standard role's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `handler` - (Required) Specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class/) +- `id` (String) The ID of this resource. -## Nested Blocks + +### Nested Schema for `metadata` -### `metadata` +Optional: -#### Arguments +- `annotations` (Map of String) An unstructured key value map stored with the runtimeclass that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the runtimeclass. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the runtimeclass, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `annotations` - (Optional) An unstructured key value map stored with the role that may be used to store arbitrary metadata. +Read-Only: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this runtimeclass that can be used by clients to determine when runtimeclass has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this runtimeclass. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](hhttps://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role. **Must match `selector`**. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) -* `name` - (Optional) Name of the role, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -#### Attributes +## Example usage -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this role that can be used by clients to determine when role has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this role. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +```terraform +resource "kubernetes_runtime_class_v1" "example" { + metadata { + name = "myclass" + } + handler = "abcdeagh" +} +``` ## Import diff --git a/docs/resources/secret.md b/docs/resources/secret.md index 67d8c2cbb6..d2729d9983 100644 --- a/docs/resources/secret.md +++ b/docs/resources/secret.md @@ -13,6 +13,54 @@ The resource provides mechanisms to inject containers with sensitive information ~> **Note:** All arguments including the secret data will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard secret's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `binary_data` (Map of String, Sensitive) A map of the secret data in base64 encoding. Use this for binary data. +- `data` (Map of String, Sensitive) A map of the secret data. +- `immutable` (Boolean) Ensures that data stored in the Secret cannot be updated (only object metadata can be modified). +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `type` (String) Type of secret +- `wait_for_service_account_token` (Boolean) Terraform will wait for the service account token to be created. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the secret that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the secret. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the secret, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the secret must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this secret that can be used by clients to determine when secret has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this secret. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + + + + ## Example Usage ```terraform @@ -96,47 +144,6 @@ resource "kubernetes_secret" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `data` - (Optional) A map of the secret data. -* `binary_data` - (Optional) A map base64 encoded map of the secret data. -* `metadata` - (Required) Standard secret's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `type` - (Optional) The secret type. Defaults to `Opaque`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/c7151dd8dd7e487e96e5ce34c6a416bb3b037609/contributors/design-proposals/auth/secrets.md#proposed-design) -* `immutable` - (Optional) Ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. -* `wait_for_service_account_token` - (Optional) Terraform will wait for the service account token to be created. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the secret that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the secret. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the secret, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the secret must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this secret that can be used by clients to determine when secret has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this secret. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### Timeouts - -`kubernetes_secret` provides the following configuration options: - -- `create` - Default `1 minute` - ## Import Secret can be imported using its namespace and name, e.g. diff --git a/docs/resources/secret_v1.md b/docs/resources/secret_v1.md index 9c74748bf3..2caa70b5e2 100644 --- a/docs/resources/secret_v1.md +++ b/docs/resources/secret_v1.md @@ -13,6 +13,54 @@ The resource provides mechanisms to inject containers with sensitive information ~> **Note:** All arguments including the secret data will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard secret's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `binary_data` (Map of String, Sensitive) A map of the secret data in base64 encoding. Use this for binary data. +- `data` (Map of String, Sensitive) A map of the secret data. +- `immutable` (Boolean) Ensures that data stored in the Secret cannot be updated (only object metadata can be modified). +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `type` (String) Type of secret +- `wait_for_service_account_token` (Boolean) Terraform will wait for the service account token to be created. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the secret that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the secret. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the secret, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the secret must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this secret that can be used by clients to determine when secret has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this secret. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + + + + ## Example Usage ```terraform @@ -96,47 +144,6 @@ resource "kubernetes_secret_v1" "example" { } ``` -## Argument Reference - -The following arguments are supported: - -* `data` - (Optional) A map of the secret data. -* `binary_data` - (Optional) A map base64 encoded map of the secret data. -* `metadata` - (Required) Standard secret's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `type` - (Optional) The secret type. Defaults to `Opaque`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/c7151dd8dd7e487e96e5ce34c6a416bb3b037609/contributors/design-proposals/auth/secrets.md#proposed-design) -* `immutable` - (Optional) Ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. -* `wait_for_service_account_token` - (Optional) Terraform will wait for the service account token to be created. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the secret that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the secret. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the secret, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the secret must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this secret that can be used by clients to determine when secret has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this secret. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### Timeouts - -`kubernetes_secret_v1` provides the following configuration options: - -- `create` - Default `1 minute` - ## Import Secret can be imported using its namespace and name, e.g. diff --git a/docs/resources/service.md b/docs/resources/service.md index a5bc715072..b35b2ba51a 100644 --- a/docs/resources/service.md +++ b/docs/resources/service.md @@ -9,6 +9,135 @@ description: |- A Service is an abstraction which defines a logical set of pods and a policy by which to access them - sometimes called a micro-service. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard service's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the behavior of a service. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_load_balancer` (Boolean) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. + +### Read-Only + +- `id` (String) The ID of this resource. +- `status` (List of Object) (see [below for nested schema](#nestedatt--status)) + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the service that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the service, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the service must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this service. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Optional: + +- `allocate_load_balancer_node_ports` (Boolean) Defines if `NodePorts` will be automatically allocated for services with type `LoadBalancer`. It may be set to `false` if the cluster load-balancer does not rely on `NodePorts`. If the caller requests specific `NodePorts` (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type `LoadBalancer`. Default is `true`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation +- `cluster_ip` (String) The IP address of the service. It is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. `None` can be specified for headless services when proxying is not required. Ignored if type is `ExternalName`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies +- `cluster_ips` (List of String) List of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise creation of the service will fail. If this field is not specified, it will be initialized from the `clusterIP` field. If this field is specified, clients must ensure that `clusterIPs[0]` and `clusterIP` have the same value. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies +- `external_ips` (Set of String) A list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. +- `external_name` (String) The external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires `type` to be `ExternalName`. +- `external_traffic_policy` (String) Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. `Local` preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. `Cluster` obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. More info: https://kubernetes.io/docs/tutorials/services/source-ip/ +- `health_check_node_port` (Number) Specifies the Healthcheck NodePort for the service. Only effects when type is set to `LoadBalancer` and external_traffic_policy is set to `Local`. +- `internal_traffic_policy` (String) Specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. `Cluster` routes internal traffic to a Service to all endpoints. `Local` routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is `Cluster`. +- `ip_families` (List of String) IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. +- `ip_family_policy` (String) IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be 'SingleStack' (a single IP family), 'PreferDualStack' (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or 'RequireDualStack' (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. +- `load_balancer_class` (String) The class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix. This field can only be set when the Service type is `LoadBalancer`. If not set, the default load balancer implementation is used. This field can only be set when creating or updating a Service to type `LoadBalancer`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class +- `load_balancer_ip` (String) Only applies to `type = LoadBalancer`. LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying this field when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. +- `load_balancer_source_ranges` (Set of String) If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature. More info: http://kubernetes.io/docs/user-guide/services-firewalls +- `port` (Block List) The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies (see [below for nested schema](#nestedblock--spec--port)) +- `publish_not_ready_addresses` (Boolean) When set to true, indicates that DNS implementations must publish the `notReadyAddresses` of subsets for the Endpoints associated with the Service. The default value is `false`. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate `SRV` records for its Pods without respect to their readiness for purpose of peer discovery. +- `selector` (Map of String) Route service traffic to pods with label keys and values matching this selector. Only applies to types `ClusterIP`, `NodePort`, and `LoadBalancer`. More info: https://kubernetes.io/docs/concepts/services-networking/service/ +- `session_affinity` (String) Used to maintain session affinity. Supports `ClientIP` and `None`. Defaults to `None`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies +- `session_affinity_config` (Block List, Max: 1) Contains the configurations of session affinity. More info: https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs (see [below for nested schema](#nestedblock--spec--session_affinity_config)) +- `type` (String) Determines how the service is exposed. Defaults to `ClusterIP`. Valid options are `ExternalName`, `ClusterIP`, `NodePort`, and `LoadBalancer`. `ExternalName` maps to the specified `external_name`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + + +### Nested Schema for `spec.port` + +Required: + +- `port` (Number) The port that will be exposed by this service. + +Optional: + +- `app_protocol` (String) The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. +- `name` (String) The name of this port within the service. All ports within the service must have unique names. Optional if only one ServicePort is defined on this service. +- `node_port` (Number) The port on each node on which this service is exposed when `type` is `NodePort` or `LoadBalancer`. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the `type` of this service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport +- `protocol` (String) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. +- `target_port` (String) Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. This field is ignored for services with `cluster_ip = "None"`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service + + + +### Nested Schema for `spec.session_affinity_config` + +Optional: + +- `client_ip` (Block List, Max: 1) Contains the configurations of Client IP based session affinity. (see [below for nested schema](#nestedblock--spec--session_affinity_config--client_ip)) + + +### Nested Schema for `spec.session_affinity_config.client_ip` + +Optional: + +- `timeout_seconds` (Number) Specifies the seconds of `ClientIP` type session sticky time. The value must be > 0 and <= 86400(for 1 day) if `ServiceAffinity` == `ClientIP`. + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + + + +### Nested Schema for `status` + +Read-Only: + +- `load_balancer` (List of Object) (see [below for nested schema](#nestedobjatt--status--load_balancer)) + + +### Nested Schema for `status.load_balancer` + +Read-Only: + +- `ingress` (List of Object) (see [below for nested schema](#nestedobjatt--status--load_balancer--ingress)) + + +### Nested Schema for `status.load_balancer.ingress` + +Read-Only: + +- `hostname` (String) +- `ip` (String) + + + + + + ## Example Usage ```terraform @@ -112,114 +241,6 @@ output "load_balancer_info" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard service's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the behavior of a service. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the service that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `allocate_load_balancer_node_ports` - (Optional) Defines if `NodePorts` will be automatically allocated for services with type `LoadBalancer`. It may be set to `false` if the cluster load-balancer does not rely on `NodePorts`. If the caller requests specific `NodePorts` (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type `LoadBalancer`. Default is `true`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation) -* `cluster_ip` - (Optional) The IP address of the service. It is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. `None` can be specified for headless services when proxying is not required. Ignored if type is `ExternalName`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `cluster_ips` - (Optional) List of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise creation of the service will fail. If this field is not specified, it will be initialized from the `clusterIP` field. If this field is specified, clients must ensure that `clusterIPs[0]` and `clusterIP` have the same value. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `external_ips` - (Optional) A list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. -* `external_name` - (Optional) The external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires `type` to be `ExternalName`. -* `external_traffic_policy` - (Optional) Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. `Local` preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. `Cluster` obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. For more info see [Kubernetes reference](https://kubernetes.io/docs/tutorials/services/source-ip/) -* `ip_families` - (Optional) A list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the `ip_family_policy` field. If this field is specified manually, the requested family is available in the cluster, and `ip_family_policy` allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dual-stack/) -* `ip_family_policy` - (Optional) Represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to `SingleStack`. Services can be `SingleStack`(a single IP family), `PreferDualStack`(two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or `RequireDualStack`(two IP families on dual-stack configured clusters, otherwise fail). The `ip_families` and `cluster_ip` fields depend on the value of this field. -* `internal_traffic_policy` - (Optional) Specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. `Cluster` routes internal traffic to a Service to all endpoints. `Local` routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is `Cluster`. -* `load_balancer_class` - (Optional) The class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix. This field can only be set when the Service type is `LoadBalancer`. If not set, the default load balancer implementation is used. This field can only be set when creating or updating a Service to type `LoadBalancer`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class) -* `load_balancer_ip` - (Optional) Only applies to `type = LoadBalancer`. LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying this field when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. -* `load_balancer_source_ranges` - (Optional) If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/). -* `port` - (Optional) The list of ports that are exposed by this service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `publish_not_ready_addresses` - (Optional) When set to true, indicates that DNS implementations must publish the `notReadyAddresses` of subsets for the Endpoints associated with the Service. The default value is `false`. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate `SRV` records for its Pods without respect to their readiness for purpose of peer discovery. -* `selector` - (Optional) Route service traffic to pods with label keys and values matching this selector. Only applies to types `ClusterIP`, `NodePort`, and `LoadBalancer`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/) -* `session_affinity` - (Optional) Used to maintain session affinity. Supports `ClientIP` and `None`. Defaults to `None`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `session_affinity_config` - (Optional) Contains the configurations of session affinity. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs) -* `type` - (Optional) Determines how the service is exposed. Defaults to `ClusterIP`. Valid options are `ExternalName`, `ClusterIP`, `NodePort`, and `LoadBalancer`. `ExternalName` maps to the specified `external_name`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) -* `health_check_node_port` - (Optional) Specifies the Healthcheck NodePort for the service. Only effects when type is set to `LoadBalancer` and external_traffic_policy is set to `Local`. - -### `port` - -#### Arguments - -* `app_protocol` - (Optional) The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per [RFC-6335](https://datatracker.ietf.org/doc/html/rfc6335) and [IANA standard service names](https://www.iana.org/assignments/service-names)). Non-standard protocols should use prefixed names such as `mycompany.com/my-custom-protocol`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#application-protocol) -* `name` - (Optional) The name of this port within the service. All ports within the service must have unique names. Optional if only one ServicePort is defined on this service. -* `node_port` - (Optional) The port on each node on which this service is exposed when `type` is `NodePort` or `LoadBalancer`. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the `type` of this service requires one. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) -* `port` - (Required) The port that will be exposed by this service. -* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. -* `target_port` - (Optional) Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. This field is ignored for services with `cluster_ip = "None"`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service) - -### `session_affinity_config` - -#### Arguments - -* `client_ip` - (Optional) Contains the configurations of Client IP based session affinity. - -### `client_ip` - -#### Arguments - -* `timeout_seconds` - (Optional) Specifies the seconds of `ClientIP` type session sticky time. The value must be > 0 and <= 86400(for 1 day) if ServiceAffinity == `ClientIP`. - -## Attributes - -* `status` - Status is a list containing the most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -### `status` - -#### Attributes - -* `load_balancer` - a list containing the current status of the load-balancer, if one is present. - -### `load_balancer` - -#### Attributes - -* `ingress` - a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - -### `ingress` - -#### Attributes - -* `ip` - IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers). -* `hostname` - Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers). - -### Timeouts - -`kubernetes_service` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - -- `create` - Default `10 minutes` - ## Import Service can be imported using its namespace and name, e.g. diff --git a/docs/resources/service_account.md b/docs/resources/service_account.md index 38f7d0c410..645290bbc7 100644 --- a/docs/resources/service_account.md +++ b/docs/resources/service_account.md @@ -11,81 +11,91 @@ A service account provides an identity for processes that run in a Pod. Read more at [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) -## Example Usage + +## Schema -```terraform -resource "kubernetes_service_account" "example" { - metadata { - name = "terraform-example" - } -} +### Required -resource "kubernetes_secret" "example" { - metadata { - annotations = { - "kubernetes.io/service-account.name" = kubernetes_service_account.example.metadata.0.name - } +- `metadata` (Block List, Min: 1, Max: 1) Standard service account's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) - generate_name = "terraform-example-" - } +### Optional - type = "kubernetes.io/service-account-token" - wait_for_service_account_token = true -} -``` +- `automount_service_account_token` (Boolean) Enable automatic mounting of the service account token +- `image_pull_secret` (Block Set) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--image_pull_secret)) +- `secret` (Block Set) A list of secrets allowed to be used by pods running using this Service Account. More info: https://kubernetes.io/docs/concepts/configuration/secret (see [below for nested schema](#nestedblock--secret)) +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `default_secret_name` (String, Deprecated) +- `id` (String) The ID of this resource. -## Argument Reference + +### Nested Schema for `metadata` -The following arguments are supported: +Optional: -* `metadata` - (Required) Standard service account's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `image_pull_secret` - (Optional) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `secret` - (Optional) A list of secrets allowed to be used by pods running using this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/secret) -* `automount_service_account_token` - (Optional) Boolean, `true` to enable automatic mounting of the service account token. Defaults to `true`. +- `annotations` (Map of String) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the service account, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the service account must be unique. -## Nested Blocks +Read-Only: -### `metadata` +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this service account. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -#### Arguments -* `annotations` - (Optional) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. + +### Nested Schema for `image_pull_secret` -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +Optional: -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) -* `name` - (Optional) Name of the service account, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the service account must be unique. + +### Nested Schema for `secret` -#### Attributes +Optional: -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -### `image_pull_secret` -#### Arguments + +### Nested Schema for `timeouts` -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Optional: -### `secret` +- `create` (String) -#### Arguments -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -## Attributes Reference -In addition to the arguments listed above, the following computed attributes are exported: +## Example Usage + +```terraform +resource "kubernetes_service_account" "example" { + metadata { + name = "terraform-example" + } +} + +resource "kubernetes_secret" "example" { + metadata { + annotations = { + "kubernetes.io/service-account.name" = kubernetes_service_account.example.metadata.0.name + } -* `default_secret_name` - (Deprecated) Name of the default secret, containing service account token, created & managed by the service. By default, the provider will try to find the secret containing the service account token that Kubernetes automatically created for the service account. Where there are multiple tokens and the provider cannot determine which was created by Kubernetes, this attribute will be empty. When only one token is associated with the service account, the provider will return this single token secret. + generate_name = "terraform-example-" + } - Starting from version `1.24.0` by default Kubernetes does not automatically generate tokens for service accounts. That leads to the situation when `default_secret_name` cannot be computed and thus will be an empty string. In order to create a service account token, please [use `kubernetes_secret_v1` resource](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret_v1#example-usage-service-account-token) + type = "kubernetes.io/service-account-token" + wait_for_service_account_token = true +} +``` ## Import diff --git a/docs/resources/service_account_v1.md b/docs/resources/service_account_v1.md index 0cab29e964..c595863fd9 100644 --- a/docs/resources/service_account_v1.md +++ b/docs/resources/service_account_v1.md @@ -7,85 +7,93 @@ description: |- # kubernetes_service_account_v1 -A service account provides an identity for processes that run in a Pod. +A service account provides an identity for processes that run in a Pod. Read more at [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) -Read more at [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) + +## Schema -## Example Usage +### Required -```terraform -resource "kubernetes_service_account_v1" "example" { - metadata { - name = "terraform-example" - } -} +- `metadata` (Block List, Min: 1, Max: 1) Standard service account's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) -resource "kubernetes_secret_v1" "example" { - metadata { - annotations = { - "kubernetes.io/service-account.name" = kubernetes_service_account_v1.example.metadata.0.name - } +### Optional - generate_name = "terraform-example-" - } +- `automount_service_account_token` (Boolean) Enable automatic mounting of the service account token +- `image_pull_secret` (Block Set) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--image_pull_secret)) +- `secret` (Block Set) A list of secrets allowed to be used by pods running using this Service Account. More info: https://kubernetes.io/docs/concepts/configuration/secret (see [below for nested schema](#nestedblock--secret)) +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) - type = "kubernetes.io/service-account-token" - wait_for_service_account_token = true -} -``` +### Read-Only -## Argument Reference +- `default_secret_name` (String, Deprecated) +- `id` (String) The ID of this resource. -The following arguments are supported: + +### Nested Schema for `metadata` -* `metadata` - (Required) Standard service account's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `image_pull_secret` - (Optional) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `secret` - (Optional) A list of secrets allowed to be used by pods running using this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/secret) -* `automount_service_account_token` - (Optional) Boolean, `true` to enable automatic mounting of the service account token. Defaults to `true`. +Optional: -## Nested Blocks +- `annotations` (Map of String) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the service account, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the service account must be unique. -### `metadata` +Read-Only: -#### Arguments +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this service account. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `annotations` - (Optional) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) + +### Nested Schema for `image_pull_secret` -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. +Optional: -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `name` - (Optional) Name of the service account, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the service account must be unique. -#### Attributes + +### Nested Schema for `secret` -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +Optional: -### `image_pull_secret` +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) + +### Nested Schema for `timeouts` -### `secret` +Optional: -#### Arguments +- `create` (String) -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -## Attributes Reference -In addition to the arguments listed above, the following computed attributes are exported: -* `default_secret_name` - (Deprecated) Name of the default secret, containing service account token, created & managed by the service. By default, the provider will try to find the secret containing the service account token that Kubernetes automatically created for the service account. Where there are multiple tokens and the provider cannot determine which was created by Kubernetes, this attribute will be empty. When only one token is associated with the service account, the provider will return this single token secret. +## Example Usage - Starting from version `1.24.0` by default Kubernetes does not automatically generate tokens for service accounts. That leads to the situation when `default_secret_name` cannot be computed and thus will be an empty string. In order to create a service account token, please [use `kubernetes_secret_v1` resource](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret_v1#example-usage-service-account-token) +```terraform +resource "kubernetes_service_account_v1" "example" { + metadata { + name = "terraform-example" + } +} + +resource "kubernetes_secret_v1" "example" { + metadata { + annotations = { + "kubernetes.io/service-account.name" = kubernetes_service_account_v1.example.metadata.0.name + } + + generate_name = "terraform-example-" + } + + type = "kubernetes.io/service-account-token" + wait_for_service_account_token = true +} +``` ## Import diff --git a/docs/resources/service_v1.md b/docs/resources/service_v1.md index 886d5a16f4..006428ce48 100644 --- a/docs/resources/service_v1.md +++ b/docs/resources/service_v1.md @@ -9,6 +9,135 @@ description: |- A Service is an abstraction which defines a logical set of pods and a policy by which to access them - sometimes called a micro-service. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard service's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the behavior of a service. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_load_balancer` (Boolean) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. + +### Read-Only + +- `id` (String) The ID of this resource. +- `status` (List of Object) (see [below for nested schema](#nestedatt--status)) + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the service that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the service, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the service must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this service. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Optional: + +- `allocate_load_balancer_node_ports` (Boolean) Defines if `NodePorts` will be automatically allocated for services with type `LoadBalancer`. It may be set to `false` if the cluster load-balancer does not rely on `NodePorts`. If the caller requests specific `NodePorts` (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type `LoadBalancer`. Default is `true`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation +- `cluster_ip` (String) The IP address of the service. It is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. `None` can be specified for headless services when proxying is not required. Ignored if type is `ExternalName`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies +- `cluster_ips` (List of String) List of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise creation of the service will fail. If this field is not specified, it will be initialized from the `clusterIP` field. If this field is specified, clients must ensure that `clusterIPs[0]` and `clusterIP` have the same value. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies +- `external_ips` (Set of String) A list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. +- `external_name` (String) The external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires `type` to be `ExternalName`. +- `external_traffic_policy` (String) Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. `Local` preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. `Cluster` obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. More info: https://kubernetes.io/docs/tutorials/services/source-ip/ +- `health_check_node_port` (Number) Specifies the Healthcheck NodePort for the service. Only effects when type is set to `LoadBalancer` and external_traffic_policy is set to `Local`. +- `internal_traffic_policy` (String) Specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. `Cluster` routes internal traffic to a Service to all endpoints. `Local` routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is `Cluster`. +- `ip_families` (List of String) IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. +- `ip_family_policy` (String) IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be 'SingleStack' (a single IP family), 'PreferDualStack' (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or 'RequireDualStack' (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. +- `load_balancer_class` (String) The class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix. This field can only be set when the Service type is `LoadBalancer`. If not set, the default load balancer implementation is used. This field can only be set when creating or updating a Service to type `LoadBalancer`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class +- `load_balancer_ip` (String) Only applies to `type = LoadBalancer`. LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying this field when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. +- `load_balancer_source_ranges` (Set of String) If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature. More info: http://kubernetes.io/docs/user-guide/services-firewalls +- `port` (Block List) The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies (see [below for nested schema](#nestedblock--spec--port)) +- `publish_not_ready_addresses` (Boolean) When set to true, indicates that DNS implementations must publish the `notReadyAddresses` of subsets for the Endpoints associated with the Service. The default value is `false`. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate `SRV` records for its Pods without respect to their readiness for purpose of peer discovery. +- `selector` (Map of String) Route service traffic to pods with label keys and values matching this selector. Only applies to types `ClusterIP`, `NodePort`, and `LoadBalancer`. More info: https://kubernetes.io/docs/concepts/services-networking/service/ +- `session_affinity` (String) Used to maintain session affinity. Supports `ClientIP` and `None`. Defaults to `None`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies +- `session_affinity_config` (Block List, Max: 1) Contains the configurations of session affinity. More info: https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs (see [below for nested schema](#nestedblock--spec--session_affinity_config)) +- `type` (String) Determines how the service is exposed. Defaults to `ClusterIP`. Valid options are `ExternalName`, `ClusterIP`, `NodePort`, and `LoadBalancer`. `ExternalName` maps to the specified `external_name`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + + +### Nested Schema for `spec.port` + +Required: + +- `port` (Number) The port that will be exposed by this service. + +Optional: + +- `app_protocol` (String) The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. +- `name` (String) The name of this port within the service. All ports within the service must have unique names. Optional if only one ServicePort is defined on this service. +- `node_port` (Number) The port on each node on which this service is exposed when `type` is `NodePort` or `LoadBalancer`. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the `type` of this service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport +- `protocol` (String) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. +- `target_port` (String) Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. This field is ignored for services with `cluster_ip = "None"`. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service + + + +### Nested Schema for `spec.session_affinity_config` + +Optional: + +- `client_ip` (Block List, Max: 1) Contains the configurations of Client IP based session affinity. (see [below for nested schema](#nestedblock--spec--session_affinity_config--client_ip)) + + +### Nested Schema for `spec.session_affinity_config.client_ip` + +Optional: + +- `timeout_seconds` (Number) Specifies the seconds of `ClientIP` type session sticky time. The value must be > 0 and <= 86400(for 1 day) if `ServiceAffinity` == `ClientIP`. + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + + + +### Nested Schema for `status` + +Read-Only: + +- `load_balancer` (List of Object) (see [below for nested schema](#nestedobjatt--status--load_balancer)) + + +### Nested Schema for `status.load_balancer` + +Read-Only: + +- `ingress` (List of Object) (see [below for nested schema](#nestedobjatt--status--load_balancer--ingress)) + + +### Nested Schema for `status.load_balancer.ingress` + +Read-Only: + +- `hostname` (String) +- `ip` (String) + + + + + + ## Example Usage ```terraform @@ -112,114 +241,6 @@ output "load_balancer_info" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard service's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the behavior of a service. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the service that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `allocate_load_balancer_node_ports` - (Optional) Defines if `NodePorts` will be automatically allocated for services with type `LoadBalancer`. It may be set to `false` if the cluster load-balancer does not rely on `NodePorts`. If the caller requests specific `NodePorts` (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type `LoadBalancer`. Default is `true`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation) -* `cluster_ip` - (Optional) The IP address of the service. It is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. `None` can be specified for headless services when proxying is not required. Ignored if type is `ExternalName`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `cluster_ips` - (Optional) List of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise creation of the service will fail. If this field is not specified, it will be initialized from the `clusterIP` field. If this field is specified, clients must ensure that `clusterIPs[0]` and `clusterIP` have the same value. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `external_ips` - (Optional) A list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. -* `external_name` - (Optional) The external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires `type` to be `ExternalName`. -* `external_traffic_policy` - (Optional) Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. `Local` preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. `Cluster` obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. For more info see [Kubernetes reference](https://kubernetes.io/docs/tutorials/services/source-ip/) -* `ip_families` - (Optional) A list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the `ip_family_policy` field. If this field is specified manually, the requested family is available in the cluster, and `ip_family_policy` allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dual-stack/) -* `ip_family_policy` - (Optional) Represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to `SingleStack`. Services can be `SingleStack`(a single IP family), `PreferDualStack`(two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or `RequireDualStack`(two IP families on dual-stack configured clusters, otherwise fail). The `ip_families` and `cluster_ip` fields depend on the value of this field. -* `internal_traffic_policy` - (Optional) Specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. `Cluster` routes internal traffic to a Service to all endpoints. `Local` routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is `Cluster`. -* `load_balancer_class` - (Optional) The class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix. This field can only be set when the Service type is `LoadBalancer`. If not set, the default load balancer implementation is used. This field can only be set when creating or updating a Service to type `LoadBalancer`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class) -* `load_balancer_ip` - (Optional) Only applies to `type = LoadBalancer`. LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying this field when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. -* `load_balancer_source_ranges` - (Optional) If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/). -* `port` - (Optional) The list of ports that are exposed by this service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `publish_not_ready_addresses` - (Optional) When set to true, indicates that DNS implementations must publish the `notReadyAddresses` of subsets for the Endpoints associated with the Service. The default value is `false`. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate `SRV` records for its Pods without respect to their readiness for purpose of peer discovery. -* `selector` - (Optional) Route service traffic to pods with label keys and values matching this selector. Only applies to types `ClusterIP`, `NodePort`, and `LoadBalancer`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/) -* `session_affinity` - (Optional) Used to maintain session affinity. Supports `ClientIP` and `None`. Defaults to `None`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `session_affinity_config` - (Optional) Contains the configurations of session affinity. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs) -* `type` - (Optional) Determines how the service is exposed. Defaults to `ClusterIP`. Valid options are `ExternalName`, `ClusterIP`, `NodePort`, and `LoadBalancer`. `ExternalName` maps to the specified `external_name`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) -* `health_check_node_port` - (Optional) Specifies the Healthcheck NodePort for the service. Only effects when type is set to `LoadBalancer` and external_traffic_policy is set to `Local`. - -### `port` - -#### Arguments - -* `app_protocol` - (Optional) The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per [RFC-6335](https://datatracker.ietf.org/doc/html/rfc6335) and [IANA standard service names](http://www.iana.org/assignments/service-names)). Non-standard protocols should use prefixed names such as `mycompany.com/my-custom-protocol`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#application-protocol) -* `name` - (Optional) The name of this port within the service. All ports within the service must have unique names. Optional if only one ServicePort is defined on this service. -* `node_port` - (Optional) The port on each node on which this service is exposed when `type` is `NodePort` or `LoadBalancer`. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the `type` of this service requires one. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) -* `port` - (Required) The port that will be exposed by this service. -* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. -* `target_port` - (Optional) Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. This field is ignored for services with `cluster_ip = "None"`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service) - -### `session_affinity_config` - -#### Arguments - -* `client_ip` - (Optional) Contains the configurations of Client IP based session affinity. - -### `client_ip` - -#### Arguments - -* `timeout_seconds` - (Optional) Specifies the seconds of `ClientIP` type session sticky time. The value must be > 0 and <= 86400(for 1 day) if ServiceAffinity == `ClientIP`. - -## Attributes - -* `status` - Status is a list containing the most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -### `status` - -#### Attributes - -* `load_balancer` - a list containing the current status of the load-balancer, if one is present. - -### `load_balancer` - -#### Attributes - -* `ingress` - a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - -### `ingress` - -#### Attributes - -* `ip` - IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers). -* `hostname` - Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers). - -### Timeouts - -`kubernetes_service_v1` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - -- `create` - Default `10 minutes` - ## Import Service can be imported using its namespace and name, e.g. diff --git a/docs/resources/stateful_set.md b/docs/resources/stateful_set.md index 269c98e605..47c337c3b2 100644 --- a/docs/resources/stateful_set.md +++ b/docs/resources/stateful_set.md @@ -13,6 +13,2338 @@ Like a Deployment , a StatefulSet manages Pods that are based on an identical co A StatefulSet operates under the same pattern as any other Controller. You define your desired state in a StatefulSet object, and the StatefulSet controller makes any necessary updates to get there from the current state. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard stateful set's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the desired identities of pods in this set. (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_rollout` (Boolean) Wait for the rollout of the stateful set to complete. Defaults to true. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the stateful set that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the stateful set. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the stateful set, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the stateful set must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this stateful set that can be used by clients to determine when stateful set has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this stateful set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `selector` (Block List, Min: 1, Max: 1) A label query over pods that should match the replica count. It must match the pod template's labels. (see [below for nested schema](#nestedblock--spec--selector)) +- `service_name` (String) The name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. +- `template` (Block List, Min: 1, Max: 1) The object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template. (see [below for nested schema](#nestedblock--spec--template)) + +Optional: + +- `persistent_volume_claim_retention_policy` (Block List) The field controls if and how PVCs are deleted during the lifecycle of a StatefulSet. (see [below for nested schema](#nestedblock--spec--persistent_volume_claim_retention_policy)) +- `pod_management_policy` (String) Controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. +- `replicas` (String) The desired number of replicas of the given Template, in the sense that they are instantiations of the same Template. Value must be a positive integer. +- `revision_history_limit` (Number) The maximum number of revisions that will be maintained in the StatefulSet's revision history. The default value is 10. +- `update_strategy` (Block List) The strategy that the StatefulSet controller will use to perform updates. (see [below for nested schema](#nestedblock--spec--update_strategy)) +- `volume_claim_template` (Block List) A list of claims that pods are allowed to reference. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. (see [below for nested schema](#nestedblock--spec--volume_claim_template)) + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard stateful set's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--template--metadata)) + +Optional: + +- `spec` (Block List, Max: 1) Spec of the pods owned by the stateful set (see [below for nested schema](#nestedblock--spec--template--spec)) + + +### Nested Schema for `spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the stateful set that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the stateful set. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the stateful set, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the stateful set must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this stateful set that can be used by clients to determine when stateful set has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this stateful set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume)) + + +### Nested Schema for `spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.init_container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.init_container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.init_container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.init_container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.os` + +Required: + +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. + + + +### Nested Schema for `spec.template.spec.readiness_gate` + +Required: + +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. + + + +### Nested Schema for `spec.template.spec.security_context` + +Optional: + +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--windows_options)) + + +### Nested Schema for `spec.template.spec.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + +### Nested Schema for `spec.template.spec.security_context.sysctl` + +Required: + +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. + + + +### Nested Schema for `spec.template.spec.security_context.windows_options` + +Optional: + +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. + + + + +### Nested Schema for `spec.template.spec.toleration` + +Optional: + +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + + + +### Nested Schema for `spec.template.spec.topology_spread_constraint` + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume` + +Optional: + +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--vsphere_volume)) + + +### Nested Schema for `spec.template.spec.volume.aws_elastic_block_store` + +Required: + +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + +### Nested Schema for `spec.template.spec.volume.azure_disk` + +Required: + +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage + +Optional: + +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.azure_file` + +Required: + +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name + +Optional: + +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. + + + +### Nested Schema for `spec.template.spec.volume.ceph_fs` + +Required: + +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +Optional: + +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + +### Nested Schema for `spec.template.spec.volume.ceph_fs.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.cinder` + +Required: + +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +Optional: + +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + +### Nested Schema for `spec.template.spec.volume.config_map` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.csi` + +Required: + +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi + +Optional: + +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. + + +### Nested Schema for `spec.template.spec.volume.csi.node_publish_secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.downward_api` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items` + +Required: + +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' + +Optional: + +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.empty_dir` + +Optional: + +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice + + + +### Nested Schema for `spec.template.spec.volume.iscsi` + +Required: + +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). + +Optional: + +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. + + + +### Nested Schema for `spec.template.spec.volume.local` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local + + + +### Nested Schema for `spec.template.spec.volume.nfs` + +Required: + +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + +Optional: + +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + + + +### Nested Schema for `spec.template.spec.volume.persistent_volume_claim` + +Optional: + +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. + + + +### Nested Schema for `spec.template.spec.volume.photon_persistent_disk` + +Required: + +- `pd_id` (String) ID that identifies Photon Controller persistent disk + +Optional: + +- `fs_type` (String) 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. + + + +### Nested Schema for `spec.template.spec.volume.projected` + +Required: + +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources)) + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. + + +### Nested Schema for `spec.template.spec.volume.projected.sources` + +Optional: + +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--service_account_token)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map` + +Optional: + +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api` + +Optional: + +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items` + +Required: + +- `path` (String) 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 '..' + +Optional: + +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret` + +Optional: + +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + +### Nested Schema for `spec.persistent_volume_claim_retention_policy` + +Optional: + +- `when_deleted` (String) This field controls what happens when a Statefulset is deleted. Default is Retain. +- `when_scaled` (String) This field controls what happens when a Statefulset is scaled. Default is Retain. + + + +### Nested Schema for `spec.update_strategy` + +Optional: + +- `rolling_update` (Block List) RollingUpdate strategy type for StatefulSet (see [below for nested schema](#nestedblock--spec--update_strategy--rolling_update)) +- `type` (String) Indicates the type of the StatefulSet update strategy. Default is RollingUpdate + + +### Nested Schema for `spec.update_strategy.rolling_update` + +Optional: + +- `partition` (Number) Indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. + + + + +### Nested Schema for `spec.volume_claim_template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard persistent volume claim's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--volume_claim_template--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims (see [below for nested schema](#nestedblock--spec--volume_claim_template--spec)) + + +### Nested Schema for `spec.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the persistent volume claim, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the persistent volume claim must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this persistent volume claim that can be used by clients to determine when persistent volume claim has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this persistent volume claim. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `read` (String) +- `update` (String) + + + + ## Example Usage ```terraform @@ -206,137 +2538,6 @@ resource "kubernetes_stateful_set" "prometheus" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Kubernetes object metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the stateful set. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the StatefulSet to finish rolling out. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the stateful set that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the stateful set. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the stateful set, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the stateful set must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this stateful set that can be used by clients to determine when stateful set has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this stateful set. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `pod_management_policy` - (Optional) podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. *Changing this forces a new resource to be created.* - -* `replicas` - (Optional) The desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. This attribute is a string to be able to distinguish between explicit zero and not specified. - -* `revision_history_limit` - (Optional) The maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. *Changing this forces a new resource to be created.* - -* `selector` - (Required) A label query over pods that should match the replica count. **It must match the pod template's labels.** *Changing this forces a new resource to be created.* More info: [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) - -* `service_name` - (Required) The name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. *Changing this forces a new resource to be created.* - -* `template` - (Required) The object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. - -* `update_strategy` - (Optional) Indicates the StatefulSet update strategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - -* `volume_claim_template` - (Optional) A list of volume claims that pods are allowed to reference. A claim in this list takes precedence over any volumes in the template, with the same name. *Changing this forces a new resource to be created.* - -* `persistent_volume_claim_retention_policy` - (Optional) The object controls if and how PVCs are deleted during the lifecycle of a StatefulSet. - -## Nested Blocks - -### `spec.template` - -#### Arguments - -* `metadata` - (Required) Standard object's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - -* `spec` - (Optional) Specification of the desired behavior of the pod. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status). - -## Nested Blocks - -### `spec.template.metadata` - -#### Arguments - -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: - -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. - -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. - -Please see the [Pod resource](pod_v1.html#metadata) for reference. - -### `spec.template.spec` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod_v1.html#spec) for reference. - -## Nested Blocks - -### `spec.update_strategy` - -#### Arguments - -* `type` - (Optional) Indicates the type of the StatefulSetUpdateStrategy. There are two valid update strategies, RollingUpdate and OnDelete. Default is `RollingUpdate`. - -* `rolling_update` - (Optional) The RollingUpdate update strategy will update all Pods in a StatefulSet, in reverse ordinal order, while respecting the StatefulSet guarantees. - -### `spec.update_strategy.rolling_update` - -#### Arguments - -* `partition` - (Optional) Indicates the ordinal at which the StatefulSet should be partitioned. You can perform a phased roll out (e.g. a linear, geometric, or exponential roll out) using a partitioned rolling update in a similar manner to how you rolled out a canary. To perform a phased roll out, set the partition to the ordinal at which you want the controller to pause the update. By setting the partition to 0, you allow the StatefulSet controller to continue the update process. Default value is `0`. - -## Nested Blocks - -### `spec.volume_claim_template` - -One or more `volume_claim_template` blocks can be specified. - -#### Arguments - -Each takes the same attibutes as a `kubernetes_persistent_volume_claim` resource. - -Please see its [documentation](persistent_volume_claim.html#argument-reference) for reference. - -### `spec.persistent_volume_claim_retention_policy` - -#### Arguments - -* `when_deleted` - (Optional) This field controls what happens when a Statefulset is deleted. Default is Retain. - -* `when_scaled` - (Optional) This field controls what happens when a Statefulset is scaled. Default is Retain. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_stateful_set` resource: - -* `create` - (Default `10 minutes`) Used for creating new StatefulSet -* `read` - (Default `10 minutes`) Used for reading a StatefulSet -* `update` - (Default `10 minutes`) Used for updating a StatefulSet -* `delete` - (Default `10 minutes`) Used for destroying a StatefulSet - ## Import kubernetes_stateful_set can be imported using its namespace and name, e.g. diff --git a/docs/resources/stateful_set_v1.md b/docs/resources/stateful_set_v1.md index 802f62f549..0b77a7fb5d 100644 --- a/docs/resources/stateful_set_v1.md +++ b/docs/resources/stateful_set_v1.md @@ -7,11 +7,2339 @@ description: |- # kubernetes_stateful_set_v1 -Manages the deployment and scaling of a set of Pods , and provides guarantees about the ordering and uniqueness of these Pods. +Manages the deployment and scaling of a set of Pods , and provides guarantees about the ordering and uniqueness of these Pods. Like a Deployment , a StatefulSet manages Pods that are based on an identical container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. These pods are created from the same spec, but are not interchangeable: each has a persistent identifier that it maintains across any rescheduling. A StatefulSet operates under the same pattern as any other Controller. You define your desired state in a StatefulSet object, and the StatefulSet controller makes any necessary updates to get there from the current state. + + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard stateful set's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the desired identities of pods in this set. (see [below for nested schema](#nestedblock--spec)) + +### Optional + +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `wait_for_rollout` (Boolean) Wait for the rollout of the stateful set to complete. Defaults to true. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the stateful set that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the stateful set. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the stateful set, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the stateful set must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this stateful set that can be used by clients to determine when stateful set has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this stateful set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Required: + +- `selector` (Block List, Min: 1, Max: 1) A label query over pods that should match the replica count. It must match the pod template's labels. (see [below for nested schema](#nestedblock--spec--selector)) +- `service_name` (String) The name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. +- `template` (Block List, Min: 1, Max: 1) The object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template. (see [below for nested schema](#nestedblock--spec--template)) + +Optional: + +- `persistent_volume_claim_retention_policy` (Block List) The field controls if and how PVCs are deleted during the lifecycle of a StatefulSet. (see [below for nested schema](#nestedblock--spec--persistent_volume_claim_retention_policy)) +- `pod_management_policy` (String) Controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. +- `replicas` (String) The desired number of replicas of the given Template, in the sense that they are instantiations of the same Template. Value must be a positive integer. +- `revision_history_limit` (Number) The maximum number of revisions that will be maintained in the StatefulSet's revision history. The default value is 10. +- `update_strategy` (Block List) The strategy that the StatefulSet controller will use to perform updates. (see [below for nested schema](#nestedblock--spec--update_strategy)) +- `volume_claim_template` (Block List) A list of claims that pods are allowed to reference. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. (see [below for nested schema](#nestedblock--spec--volume_claim_template)) + + +### Nested Schema for `spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `spec.template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard stateful set's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--template--metadata)) + +Optional: + +- `spec` (Block List, Max: 1) Spec of the pods owned by the stateful set (see [below for nested schema](#nestedblock--spec--template--spec)) + + +### Nested Schema for `spec.template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the stateful set that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the stateful set. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the stateful set, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the stateful set must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this stateful set that can be used by clients to determine when stateful set has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this stateful set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.template.spec` + +Optional: + +- `active_deadline_seconds` (Number) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. +- `affinity` (Block List, Max: 1) Optional pod scheduling constraints. (see [below for nested schema](#nestedblock--spec--template--spec--affinity)) +- `automount_service_account_token` (Boolean) AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. +- `container` (Block List) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/ (see [below for nested schema](#nestedblock--spec--template--spec--container)) +- `dns_config` (Block List, Max: 1) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--dns_config)) +- `dns_policy` (String) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Defaults to 'ClusterFirst'. More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +- `enable_service_links` (Boolean) Enables generating environment variables for service discovery. Defaults to true. +- `host_aliases` (Block List) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. (see [below for nested schema](#nestedblock--spec--template--spec--host_aliases)) +- `host_ipc` (Boolean) Use the host's ipc namespace. Optional: Defaults to false. +- `host_network` (Boolean) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. +- `host_pid` (Boolean) Use the host's pid namespace. +- `hostname` (String) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. +- `image_pull_secrets` (Block List) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod (see [below for nested schema](#nestedblock--spec--template--spec--image_pull_secrets)) +- `init_container` (Block List) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container)) +- `node_name` (String) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. +- `node_selector` (Map of String) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/. +- `os` (Block List, Max: 1) Specifies the OS of the containers in the pod. (see [below for nested schema](#nestedblock--spec--template--spec--os)) +- `priority_class_name` (String) If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. +- `readiness_gate` (Block List) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md (see [below for nested schema](#nestedblock--spec--template--spec--readiness_gate)) +- `restart_policy` (String) Restart policy for all containers within the pod. One of Always, OnFailure, Never. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy. +- `runtime_class_name` (String) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. More info: https://kubernetes.io/docs/concepts/containers/runtime-class +- `scheduler_name` (String) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. +- `security_context` (Block List, Max: 1) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--security_context)) +- `service_account_name` (String) ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md. +- `share_process_namespace` (Boolean) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Defaults to false. +- `subdomain` (String) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. +- `termination_grace_period_seconds` (Number) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. +- `toleration` (Block List) If specified, the pod's toleration. Optional: Defaults to empty (see [below for nested schema](#nestedblock--spec--template--spec--toleration)) +- `topology_spread_constraint` (Block List) describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint)) +- `volume` (Block List) List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume)) + + +### Nested Schema for `spec.template.spec.affinity` + +Optional: + +- `node_affinity` (Block List, Max: 1) Node affinity scheduling rules for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity)) +- `pod_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity)) +- `pod_anti_affinity` (Block List, Max: 1) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List, Max: 1) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a node label update), the system may or may not try to eventually evict the pod from its node. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `preference` (Block List, Min: 1, Max: 1) A node selector term, associated with the corresponding weight. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference)) +- `weight` (Number) weight is in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--preferred_during_scheduling_ignored_during_execution--preference--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution` + +Optional: + +- `node_selector_term` (Block List) List of node selector terms. The terms are ORed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term` + +Optional: + +- `match_expressions` (Block List) List of node selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_expressions)) +- `match_fields` (Block List) A list of node selector requirements by node's fields. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--node_affinity--required_during_scheduling_ignored_during_execution--node_selector_term--match_fields)) + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. +- `values` (Set of 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + + + +### Nested Schema for `spec.template.spec.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_term.match_fields` + +Required: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, and `Lt`. + +Optional: + +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity` + +Optional: + +- `preferred_during_scheduling_ignored_during_execution` (Block List) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, RequiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding 'weight' to the sum if the node matches the corresponding MatchExpressions; the node(s) with the highest sum are the most preferred. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution)) +- `required_during_scheduling_ignored_during_execution` (Block List) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each PodAffinityTerm are intersected, i.e. all terms must be satisfied. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution)) + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution` + +Required: + +- `pod_affinity_term` (Block List, Min: 1, Max: 1) A pod affinity term, associated with the corresponding weight (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term)) +- `weight` (Number) weight associated with matching the corresponding podAffinityTerm, in the range 1-100 + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--preferred_during_scheduling_ignored_during_execution--pod_affinity_term--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution` + +Required: + +- `topology_key` (String) empty topology key is interpreted by the scheduler as 'all topologies' + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector)) +- `namespaces` (Set of String) namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means 'this pod's namespace' + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--affinity--pod_anti_affinity--required_during_scheduling_ignored_during_execution--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `spec.template.spec.container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from)) + + +### Nested Schema for `spec.template.spec.container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.dns_config` + +Optional: + +- `nameservers` (List of String) A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. +- `option` (Block List) A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. (see [below for nested schema](#nestedblock--spec--template--spec--dns_config--option)) +- `searches` (List of String) A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + + +### Nested Schema for `spec.template.spec.dns_config.option` + +Required: + +- `name` (String) Name of the option. + +Optional: + +- `value` (String) Value of the option. Optional: Defaults to empty. + + + + +### Nested Schema for `spec.template.spec.host_aliases` + +Required: + +- `hostnames` (List of String) Hostnames for the IP address. +- `ip` (String) IP address of the host file entry. + + + +### Nested Schema for `spec.template.spec.image_pull_secrets` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + +### Nested Schema for `spec.template.spec.init_container` + +Required: + +- `name` (String) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +Optional: + +- `args` (List of String) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `command` (List of String) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +- `env` (Block List) List of environment variables to set in the container. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env)) +- `env_from` (Block List) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from)) +- `image` (String) Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images/ +- `image_pull_policy` (String) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images/#updating-images +- `lifecycle` (Block List, Max: 1) Actions that the management system should take in response to container lifecycle events (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle)) +- `liveness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe)) +- `port` (Block List) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--port)) +- `readiness_probe` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe)) +- `resources` (Block List, Max: 1) Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--init_container--resources)) +- `security_context` (Block List, Max: 1) Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context)) +- `startup_probe` (Block List, Max: 1) 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. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe)) +- `stdin` (Boolean) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. +- `stdin_once` (Boolean) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. +- `termination_message_path` (String) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. +- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +- `tty` (Boolean) Whether this container should allocate a TTY for itself +- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount)) +- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + + +### Nested Schema for `spec.template.spec.init_container.env` + +Required: + +- `name` (String) Name of the environment variable. Must be a C_IDENTIFIER + +Optional: + +- `value` (String) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +- `value_from` (Block List, Max: 1) Source for the environment variable's value (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from` + +Optional: + +- `config_map_key_ref` (Block List, Max: 1) Selects a key of a ConfigMap. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--config_map_key_ref)) +- `field_ref` (Block List, Max: 1) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--field_ref)) +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--resource_field_ref)) +- `secret_key_ref` (Block List, Max: 1) Selects a key of a secret in the pod's namespace. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env--value_from--secret_key_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.config_map_key_ref` + +Optional: + +- `key` (String) The key to select. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the ConfigMap or its key must be defined. + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.resource_field_ref` + +Required: + +- `resource` (String) Resource to select + +Optional: + +- `container_name` (String) +- `divisor` (String) + + + +### Nested Schema for `spec.template.spec.init_container.env.value_from.secret_key_ref` + +Optional: + +- `key` (String) The key of the secret to select from. Must be a valid secret key. +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Specify whether the Secret or its key must be defined. + + + + + +### Nested Schema for `spec.template.spec.init_container.env_from` + +Optional: + +- `config_map_ref` (Block List, Max: 1) The ConfigMap to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--config_map_ref)) +- `prefix` (String) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +- `secret_ref` (Block List, Max: 1) The Secret to select from (see [below for nested schema](#nestedblock--spec--template--spec--init_container--env_from--secret_ref)) + + +### Nested Schema for `spec.template.spec.init_container.env_from.config_map_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the ConfigMap must be defined + + + +### Nested Schema for `spec.template.spec.init_container.env_from.secret_ref` + +Required: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Optional: + +- `optional` (Boolean) Specify whether the Secret must be defined + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle` + +Optional: + +- `post_start` (Block List) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start)) +- `pre_stop` (Block List) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--post_start--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.post_start.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--exec)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get)) +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--tcp_socket)) + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--lifecycle--pre_stop--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.lifecycle.pre_stop.tcp_socket` + +Required: + +- `port` (String) 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. + + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--liveness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.liveness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.port` + +Required: + +- `container_port` (Number) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + +Optional: + +- `host_ip` (String) What host IP to bind the external port to. +- `host_port` (Number) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +- `name` (String) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services +- `protocol` (String) Protocol for port. Must be UDP or TCP. Defaults to "TCP". + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--readiness_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.readiness_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.resources` + +Optional: + +- `limits` (Map of String) Describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + + + +### Nested Schema for `spec.template.spec.init_container.security_context` + +Optional: + +- `allow_privilege_escalation` (Boolean) 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 +- `capabilities` (Block List, Max: 1) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--capabilities)) +- `privileged` (Boolean) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +- `read_only_root_filesystem` (Boolean) Whether this container has a read-only root filesystem. Default is false. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--security_context--seccomp_profile)) + + +### Nested Schema for `spec.template.spec.init_container.security_context.capabilities` + +Optional: + +- `add` (List of String) Added capabilities +- `drop` (List of String) Removed capabilities + + + +### Nested Schema for `spec.template.spec.init_container.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.init_container.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe` + +Optional: + +- `exec` (Block List, Max: 1) exec specifies the action to take. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--exec)) +- `failure_threshold` (Number) Minimum consecutive failures for the probe to be considered failed after having succeeded. +- `grpc` (Block List) GRPC specifies an action involving a GRPC port. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--grpc)) +- `http_get` (Block List, Max: 1) Specifies the http request to perform. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get)) +- `initial_delay_seconds` (Number) 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 +- `period_seconds` (Number) How often (in seconds) to perform the probe +- `success_threshold` (Number) Minimum consecutive successes for the probe to be considered successful after having failed. +- `tcp_socket` (Block List) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--tcp_socket)) +- `timeout_seconds` (Number) Number of seconds after which the probe times out. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.exec` + +Optional: + +- `command` (List of String) 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. 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.grpc` + +Required: + +- `port` (Number) Number of the port to access on the container. Number must be in the range 1 to 65535. + +Optional: + +- `service` (String) 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. + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get` + +Optional: + +- `host` (String) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. +- `http_header` (Block List) Scheme to use for connecting to the host. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--startup_probe--http_get--http_header)) +- `path` (String) Path to access on the HTTP server. +- `port` (String) 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. +- `scheme` (String) Scheme to use for connecting to the host. + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.http_get.http_header` + +Optional: + +- `name` (String) The header field name +- `value` (String) The header field value + + + + +### Nested Schema for `spec.template.spec.init_container.startup_probe.tcp_socket` + +Required: + +- `port` (String) 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. + + + + +### Nested Schema for `spec.template.spec.init_container.volume_mount` + +Required: + +- `mount_path` (String) Path within the container at which the volume should be mounted. Must not contain ':'. +- `name` (String) This must match the Name of a Volume. + +Optional: + +- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional. +- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + + + + +### Nested Schema for `spec.template.spec.os` + +Required: + +- `name` (String) Name is the name of the operating system. The currently supported values are linux and windows. + + + +### Nested Schema for `spec.template.spec.readiness_gate` + +Required: + +- `condition_type` (String) refers to a condition in the pod's condition list with matching type. + + + +### Nested Schema for `spec.template.spec.security_context` + +Optional: + +- `fs_group` (String) 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. +- `fs_group_change_policy` (String) 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. +- `run_as_group` (String) 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. +- `run_as_non_root` (Boolean) 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. +- `run_as_user` (String) 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. +- `se_linux_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--se_linux_options)) +- `seccomp_profile` (Block List, Max: 1) The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--seccomp_profile)) +- `supplemental_groups` (Set of Number) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +- `sysctl` (Block List) holds a list of namespaced sysctls used for the pod. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--sysctl)) +- `windows_options` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--security_context--windows_options)) + + +### Nested Schema for `spec.template.spec.security_context.se_linux_options` + +Optional: + +- `level` (String) Level is SELinux level label that applies to the container. +- `role` (String) Role is a SELinux role label that applies to the container. +- `type` (String) Type is a SELinux type label that applies to the container. +- `user` (String) User is a SELinux user label that applies to the container. + + + +### Nested Schema for `spec.template.spec.security_context.seccomp_profile` + +Optional: + +- `localhost_profile` (String) Localhost Profile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. +- `type` (String) Type indicates which kind of seccomp profile will be applied. Valid options are: Localhost, RuntimeDefault, Unconfined. + + + +### Nested Schema for `spec.template.spec.security_context.sysctl` + +Required: + +- `name` (String) Name of a property to set. +- `value` (String) Value of a property to set. + + + +### Nested Schema for `spec.template.spec.security_context.windows_options` + +Optional: + +- `gmsa_credential_spec` (String) GMSACredentialSpec is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field +- `gmsa_credential_spec_name` (String) GMSACredentialSpecName is the name of the GMSA credential spec to use. +- `host_process` (Boolean) HostProcess determines if a container should be run as a 'Host Process' container. Default value is false. +- `run_as_username` (String) 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. + + + + +### Nested Schema for `spec.template.spec.toleration` + +Optional: + +- `effect` (String) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. +- `key` (String) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. +- `operator` (String) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. +- `toleration_seconds` (String) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. +- `value` (String) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + + + +### Nested Schema for `spec.template.spec.topology_spread_constraint` + +Optional: + +- `label_selector` (Block List) A label query over a set of resources, in this case pods. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector)) +- `match_label_keys` (Set of String) is a set of pod label keys to select the pods over which spreading will be calculated. +- `max_skew` (Number) describes the degree to which pods may be unevenly distributed. +- `min_domains` (Number) indicates a minimum number of eligible domains. +- `node_affinity_policy` (String) indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. +- `node_taints_policy` (String) indicates how we will treat node taints when calculating pod topology spread skew. +- `topology_key` (String) the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. +- `when_unsatisfiable` (String) indicates how to deal with a pod if it doesn't satisfy the spread constraint. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--topology_spread_constraint--label_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.topology_spread_constraint.label_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume` + +Optional: + +- `aws_elastic_block_store` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--aws_elastic_block_store)) +- `azure_disk` (Block List, Max: 1) Represents an Azure Data Disk mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_disk)) +- `azure_file` (Block List, Max: 1) Represents an Azure File Service mount on the host and bind mount to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--azure_file)) +- `ceph_fs` (Block List, Max: 1) Represents a Ceph FS mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs)) +- `cinder` (Block List, Max: 1) Represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--cinder)) +- `config_map` (Block List, Max: 1) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map)) +- `csi` (Block List, Max: 1) Represents a CSI Volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#csi (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api)) +- `empty_dir` (Block List, Max: 1) EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir (see [below for nested schema](#nestedblock--spec--template--spec--volume--empty_dir)) +- `ephemeral` (Block List, Max: 1) Represents an ephemeral volume that is handled by a normal storage driver. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral)) +- `fc` (Block List, Max: 1) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. (see [below for nested schema](#nestedblock--spec--template--spec--volume--fc)) +- `flex_volume` (Block List, Max: 1) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume)) +- `flocker` (Block List, Max: 1) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running (see [below for nested schema](#nestedblock--spec--template--spec--volume--flocker)) +- `gce_persistent_disk` (Block List, Max: 1) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk (see [below for nested schema](#nestedblock--spec--template--spec--volume--gce_persistent_disk)) +- `git_repo` (Block List, Max: 1) GitRepo represents a git repository at a particular revision. (see [below for nested schema](#nestedblock--spec--template--spec--volume--git_repo)) +- `glusterfs` (Block List, Max: 1) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md (see [below for nested schema](#nestedblock--spec--template--spec--volume--glusterfs)) +- `host_path` (Block List, Max: 1) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath (see [below for nested schema](#nestedblock--spec--template--spec--volume--host_path)) +- `iscsi` (Block List, Max: 1) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. (see [below for nested schema](#nestedblock--spec--template--spec--volume--iscsi)) +- `local` (Block List, Max: 1) Represents a mounted local storage device such as a disk, partition or directory. Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet. More info: https://kubernetes.io/docs/concepts/storage/volumes#local (see [below for nested schema](#nestedblock--spec--template--spec--volume--local)) +- `name` (String) Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `nfs` (Block List, Max: 1) Represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs (see [below for nested schema](#nestedblock--spec--template--spec--volume--nfs)) +- `persistent_volume_claim` (Block List, Max: 1) The specification of a persistent volume. (see [below for nested schema](#nestedblock--spec--template--spec--volume--persistent_volume_claim)) +- `photon_persistent_disk` (Block List, Max: 1) Represents a PhotonController persistent disk attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--photon_persistent_disk)) +- `projected` (Block List) Projected represents a single volume that projects several volume sources into the same directory. More info: https://kubernetes.io/docs/concepts/storage/volumes/#projected (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected)) +- `quobyte` (Block List, Max: 1) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime (see [below for nested schema](#nestedblock--spec--template--spec--volume--quobyte)) +- `rbd` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd)) +- `secret` (Block List, Max: 1) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret)) +- `vsphere_volume` (Block List, Max: 1) Represents a vSphere volume attached and mounted on kubelets host machine (see [below for nested schema](#nestedblock--spec--template--spec--volume--vsphere_volume)) + + +### Nested Schema for `spec.template.spec.volume.aws_elastic_block_store` + +Required: + +- `volume_id` (String) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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). +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + +### Nested Schema for `spec.template.spec.volume.azure_disk` + +Required: + +- `caching_mode` (String) Host Caching mode: None, Read Only, Read Write. +- `data_disk_uri` (String) The URI the data disk in the blob storage +- `disk_name` (String) The Name of the data disk in the blob storage + +Optional: + +- `fs_type` (String) 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. +- `kind` (String) The type for the data disk. Expected values: Shared, Dedicated, Managed. Defaults to Shared +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.azure_file` + +Required: + +- `secret_name` (String) The name of secret that contains Azure Storage Account Name and Key +- `share_name` (String) Share Name + +Optional: + +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). +- `secret_namespace` (String) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is "default" namespace. + + + +### Nested Schema for `spec.template.spec.volume.ceph_fs` + +Required: + +- `monitors` (Set of String) Monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +Optional: + +- `path` (String) Used as the mounted root, rather than the full Ceph tree, default is / +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +- `secret_file` (String) 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 +- `secret_ref` (Block List, Max: 1) Reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it (see [below for nested schema](#nestedblock--spec--template--spec--volume--ceph_fs--secret_ref)) +- `user` (String) User is the rados user name, default is admin. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + +### Nested Schema for `spec.template.spec.volume.ceph_fs.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.cinder` + +Required: + +- `volume_id` (String) Volume ID used to identify the volume in Cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +Optional: + +- `fs_type` (String) 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 +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + +### Nested Schema for `spec.template.spec.volume.config_map` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or its keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.csi` + +Required: + +- `driver` (String) the name of the volume driver to use. More info: https://kubernetes.io/docs/concepts/storage/volumes/#csi + +Optional: + +- `fs_type` (String) 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. +- `node_publish_secret_ref` (Block List, Max: 1) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. (see [below for nested schema](#nestedblock--spec--template--spec--volume--csi--node_publish_secret_ref)) +- `read_only` (Boolean) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#csi +- `volume_attributes` (Map of String) Attributes of the volume to publish. + + +### Nested Schema for `spec.template.spec.volume.csi.node_publish_secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.downward_api` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items` + +Required: + +- `field_ref` (Block List, Min: 1, Max: 1) Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--field_ref)) +- `path` (String) 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 '..' + +Optional: + +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to "v1". +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.empty_dir` + +Optional: + +- `medium` (String) What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be one of ["" "Memory" "HugePages" "HugePages-2Mi" "HugePages-1Gi"]. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +- `size_limit` (String) Total amount of local storage required for this EmptyDir volume. + + + +### Nested Schema for `spec.template.spec.volume.ephemeral` + +Required: + +- `volume_claim_template` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template` + +Required: + +- `spec` (Block List, Min: 1, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec)) + +Optional: + +- `metadata` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--metadata)) + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--template--spec--volume--ephemeral--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + +### Nested Schema for `spec.template.spec.volume.ephemeral.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + + + + + +### Nested Schema for `spec.template.spec.volume.fc` + +Required: + +- `lun` (Number) FC target lun number +- `target_ww_ns` (Set of String) FC target worldwide names (WWNs) + +Optional: + +- `fs_type` (String) 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. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). + + + +### Nested Schema for `spec.template.spec.volume.flex_volume` + +Required: + +- `driver` (String) Driver is the name of the driver to use for this volume. + +Optional: + +- `fs_type` (String) 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. +- `options` (Map of String) Extra command options if any. +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). +- `secret_ref` (Block List, Max: 1) 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. (see [below for nested schema](#nestedblock--spec--template--spec--volume--flex_volume--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.flex_volume.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.flocker` + +Optional: + +- `dataset_name` (String) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +- `dataset_uuid` (String) UUID of the dataset. This is unique identifier of a Flocker dataset + + + +### Nested Schema for `spec.template.spec.volume.gce_persistent_disk` + +Required: + +- `pd_name` (String) 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 + +Optional: + +- `fs_type` (String) 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 +- `partition` (Number) 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 +- `read_only` (Boolean) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + +### Nested Schema for `spec.template.spec.volume.git_repo` + +Optional: + +- `directory` (String) 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. +- `repository` (String) Repository URL +- `revision` (String) Commit hash for the specified revision. + + + +### Nested Schema for `spec.template.spec.volume.glusterfs` + +Required: + +- `endpoints_name` (String) The endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +- `path` (String) The Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +Optional: + +- `read_only` (Boolean) Whether to 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 + + + +### Nested Schema for `spec.template.spec.volume.host_path` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +- `type` (String) Type for HostPath volume. Allowed values are "" (default), DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice and BlockDevice + + + +### Nested Schema for `spec.template.spec.volume.iscsi` + +Required: + +- `iqn` (String) Target iSCSI Qualified Name. +- `target_portal` (String) 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). + +Optional: + +- `fs_type` (String) 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 +- `iscsi_interface` (String) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). +- `lun` (Number) iSCSI target lun number. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. + + + +### Nested Schema for `spec.template.spec.volume.local` + +Optional: + +- `path` (String) Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#local + + + +### Nested Schema for `spec.template.spec.volume.nfs` + +Required: + +- `path` (String) Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +- `server` (String) Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + +Optional: + +- `read_only` (Boolean) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + + + +### Nested Schema for `spec.template.spec.volume.persistent_volume_claim` + +Optional: + +- `claim_name` (String) ClaimName is the name of a PersistentVolumeClaim in the same +- `read_only` (Boolean) Will force the ReadOnly setting in VolumeMounts. + + + +### Nested Schema for `spec.template.spec.volume.photon_persistent_disk` + +Required: + +- `pd_id` (String) ID that identifies Photon Controller persistent disk + +Optional: + +- `fs_type` (String) 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. + + + +### Nested Schema for `spec.template.spec.volume.projected` + +Required: + +- `sources` (Block List, Min: 1) Source of the volume to project in the directory. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources)) + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. + + +### Nested Schema for `spec.template.spec.volume.projected.sources` + +Optional: + +- `config_map` (Block List) ConfigMap represents a configMap that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map)) +- `downward_api` (Block List, Max: 1) DownwardAPI represents downward API about the pod that should populate this volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api)) +- `secret` (Block List) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret)) +- `service_account_token` (Block List, Max: 1) A projected service account token volume (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--service_account_token)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map` + +Optional: + +- `items` (Block List) 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. Paths must be relative and may not contain the '..' path or start with '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--config_map--items)) +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `optional` (Boolean) Optional: Specify whether the ConfigMap or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.config_map.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api` + +Optional: + +- `items` (Block List) Represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items` + +Required: + +- `path` (String) 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 '..' + +Optional: + +- `field_ref` (Block List, Max: 1) Selects a field of the pod: only annotations, labels, name and namespace are supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--field_ref)) +- `mode` (String) Mode bits to use on this file, must be a value between 0 and 0777. 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. +- `resource_field_ref` (Block List, Max: 1) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--downward_api--items--resource_field_ref)) + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.field_ref` + +Optional: + +- `api_version` (String) Version of the schema the FieldPath is written in terms of, defaults to 'v1'. +- `field_path` (String) Path of the field to select in the specified API version + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.downward_api.items.resource_field_ref` + +Required: + +- `container_name` (String) +- `resource` (String) Resource to select + +Optional: + +- `divisor` (String) + + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret` + +Optional: + +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--projected--sources--secret--items)) +- `name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets +- `optional` (Boolean) Optional: Specify whether the Secret or it's keys must be defined. + + +### Nested Schema for `spec.template.spec.volume.projected.sources.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.projected.sources.service_account_token` + +Required: + +- `path` (String) Path specifies a relative path to the mount point of the projected volume. + +Optional: + +- `audience` (String) Audience is the intended audience of the token +- `expiration_seconds` (Number) ExpirationSeconds is the expected duration of validity of the service account token. It defaults to 1 hour and must be at least 10 minutes (600 seconds). + + + + + +### Nested Schema for `spec.template.spec.volume.quobyte` + +Required: + +- `registry` (String) 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 +- `volume` (String) Volume is a string that references an already created Quobyte volume by name. + +Optional: + +- `group` (String) Group to map volume access to Default is no group +- `read_only` (Boolean) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +- `user` (String) User to map volume access to Defaults to serivceaccount user + + + +### Nested Schema for `spec.template.spec.volume.rbd` + +Required: + +- `ceph_monitors` (Set of String) A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_image` (String) The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +Optional: + +- `fs_type` (String) 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 +- `keyring` (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 +- `rados_user` (String) The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `rbd_pool` (String) The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it. +- `read_only` (Boolean) Whether to force the read-only setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +- `secret_ref` (Block List, Max: 1) 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 (see [below for nested schema](#nestedblock--spec--template--spec--volume--rbd--secret_ref)) + + +### Nested Schema for `spec.template.spec.volume.rbd.secret_ref` + +Optional: + +- `name` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + + + +### Nested Schema for `spec.template.spec.volume.secret` + +Optional: + +- `default_mode` (String) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. +- `items` (Block List) 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 '..'. (see [below for nested schema](#nestedblock--spec--template--spec--volume--secret--items)) +- `optional` (Boolean) Optional: Specify whether the Secret or its keys must be defined. +- `secret_name` (String) Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secrets + + +### Nested Schema for `spec.template.spec.volume.secret.items` + +Optional: + +- `key` (String) The key to project. +- `mode` (String) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. +- `path` (String) 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 '..'. + + + + +### Nested Schema for `spec.template.spec.volume.vsphere_volume` + +Required: + +- `volume_path` (String) Path that identifies vSphere volume vmdk + +Optional: + +- `fs_type` (String) 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. + + + + + + +### Nested Schema for `spec.persistent_volume_claim_retention_policy` + +Optional: + +- `when_deleted` (String) This field controls what happens when a Statefulset is deleted. Default is Retain. +- `when_scaled` (String) This field controls what happens when a Statefulset is scaled. Default is Retain. + + + +### Nested Schema for `spec.update_strategy` + +Optional: + +- `rolling_update` (Block List) RollingUpdate strategy type for StatefulSet (see [below for nested schema](#nestedblock--spec--update_strategy--rolling_update)) +- `type` (String) Indicates the type of the StatefulSet update strategy. Default is RollingUpdate + + +### Nested Schema for `spec.update_strategy.rolling_update` + +Optional: + +- `partition` (Number) Indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. + + + + +### Nested Schema for `spec.volume_claim_template` + +Required: + +- `metadata` (Block List, Min: 1, Max: 1) Standard persistent volume claim's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--spec--volume_claim_template--metadata)) +- `spec` (Block List, Min: 1, Max: 1) Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims (see [below for nested schema](#nestedblock--spec--volume_claim_template--spec)) + + +### Nested Schema for `spec.volume_claim_template.metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the persistent volume claim, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the persistent volume claim must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this persistent volume claim that can be used by clients to determine when persistent volume claim has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this persistent volume claim. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec.volume_claim_template.spec` + +Required: + +- `access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes +- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--volume_claim_template--spec--resources)) + +Optional: + +- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--volume_claim_template--spec--selector)) +- `storage_class_name` (String) Name of the storage class requested by the claim +- `volume_mode` (String) Defines what type of volume is required by the claim. +- `volume_name` (String) The binding reference to the PersistentVolume backing this claim. + + +### Nested Schema for `spec.volume_claim_template.spec.resources` + +Optional: + +- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + +### Nested Schema for `spec.volume_claim_template.spec.selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--volume_claim_template--spec--selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `spec.volume_claim_template.spec.selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `read` (String) +- `update` (String) + -Like a Deployment , a StatefulSet manages Pods that are based on an identical container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. These pods are created from the same spec, but are not interchangeable: each has a persistent identifier that it maintains across any rescheduling. -A StatefulSet operates under the same pattern as any other Controller. You define your desired state in a StatefulSet object, and the StatefulSet controller makes any necessary updates to get there from the current state. ## Example Usage @@ -206,137 +2534,6 @@ resource "kubernetes_stateful_set_v1" "prometheus" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Kubernetes object metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the stateful set. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the StatefulSet to finish rolling out. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the stateful set that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the stateful set. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the stateful set, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the stateful set must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this stateful set that can be used by clients to determine when stateful set has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this stateful set. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `pod_management_policy` - (Optional) podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. *Changing this forces a new resource to be created.* - -* `replicas` - (Optional) The desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. This attribute is a string to be able to distinguish between explicit zero and not specified. - -* `revision_history_limit` - (Optional) The maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. *Changing this forces a new resource to be created.* - -* `selector` - (Required) A label query over pods that should match the replica count. **It must match the pod template's labels.** *Changing this forces a new resource to be created.* More info: [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) - -* `service_name` - (Required) The name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. *Changing this forces a new resource to be created.* - -* `template` - (Required) The object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. - -* `update_strategy` - (Optional) Indicates the StatefulSet update strategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - -* `volume_claim_template` - (Optional) A list of volume claims that pods are allowed to reference. A claim in this list takes precedence over any volumes in the template, with the same name. *Changing this forces a new resource to be created.* - -* `persistent_volume_claim_retention_policy` - (Optional) The object controls if and how PVCs are deleted during the lifecycle of a StatefulSet. - -## Nested Blocks - -### `spec.template` - -#### Arguments - -* `metadata` - (Required) Standard object's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - -* `spec` - (Optional) Specification of the desired behavior of the pod. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status). - -## Nested Blocks - -### `spec.template.metadata` - -#### Arguments - -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: - -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. - -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. - -Please see the [Pod resource](pod_v1.html#metadata) for reference. - -### `spec.template.spec` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod_v1.html#spec) for reference. - -## Nested Blocks - -### `spec.update_strategy` - -#### Arguments - -* `type` - (Optional) Indicates the type of the StatefulSetUpdateStrategy. There are two valid update strategies, RollingUpdate and OnDelete. Default is `RollingUpdate`. - -* `rolling_update` - (Optional) The RollingUpdate update strategy will update all Pods in a StatefulSet, in reverse ordinal order, while respecting the StatefulSet guarantees. - -### `spec.update_strategy.rolling_update` - -#### Arguments - -* `partition` - (Optional) Indicates the ordinal at which the StatefulSet should be partitioned. You can perform a phased roll out (e.g. a linear, geometric, or exponential roll out) using a partitioned rolling update in a similar manner to how you rolled out a canary. To perform a phased roll out, set the partition to the ordinal at which you want the controller to pause the update. By setting the partition to 0, you allow the StatefulSet controller to continue the update process. Default value is `0`. - -## Nested Blocks - -### `spec.volume_claim_template` - -One or more `volume_claim_template` blocks can be specified. - -#### Arguments - -Each takes the same attibutes as a `kubernetes_persistent_volume_claim_v1` resource. - -Please see its [documentation](persistent_volume_claim_v1.html#argument-reference) for reference. - -### `spec.persistent_volume_claim_retention_policy` - -#### Arguments - -* `when_deleted` - (Optional) This field controls what happens when a Statefulset is deleted. Default is Retain. - -* `when_scaled` - (Optional) This field controls what happens when a Statefulset is scaled. Default is Retain. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_stateful_set_v1` resource: - -* `create` - (Default `10 minutes`) Used for creating new StatefulSet -* `read` - (Default `10 minutes`) Used for reading a StatefulSet -* `update` - (Default `10 minutes`) Used for updating a StatefulSet -* `delete` - (Default `10 minutes`) Used for destroying a StatefulSet - ## Import kubernetes_stateful_set_v1 can be imported using its namespace and name, e.g. diff --git a/docs/resources/storage_class.md b/docs/resources/storage_class.md index 52876acc38..6b9bf20ee5 100644 --- a/docs/resources/storage_class.md +++ b/docs/resources/storage_class.md @@ -5,76 +5,84 @@ description: |- Storage class is the foundation of dynamic provisioning, allowing cluster administrators to define abstractions for the underlying storage platform. --- -# kubernetes_storage_class +# kubernetes_storage_class Storage class is the foundation of dynamic provisioning, allowing cluster administrators to define abstractions for the underlying storage platform. Read more at https://kubernetes.io/blog/2017/03/dynamic-provisioning-and-storage-classes-kubernetes/ -## Example Usage + +## Schema -```terraform -resource "kubernetes_storage_class" "example" { - metadata { - name = "terraform-example" - } - storage_provisioner = "kubernetes.io/gce-pd" - reclaim_policy = "Retain" - parameters = { - type = "pd-standard" - } - mount_options = ["file_mode=0700", "dir_mode=0777", "mfsymlinks", "uid=1000", "gid=1000", "nobrl", "cache=none"] -} -``` +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard storage class's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `storage_provisioner` (String) Indicates the type of the provisioner + +### Optional -## Argument Reference +- `allow_volume_expansion` (Boolean) Indicates whether the storage class allow volume expand +- `allowed_topologies` (Block List, Max: 1) Restrict the node topologies where volumes can be dynamically provisioned. (see [below for nested schema](#nestedblock--allowed_topologies)) +- `mount_options` (Set of String) Persistent Volumes that are dynamically created by a storage class will have the mount options specified +- `parameters` (Map of String) The parameters for the provisioner that should create volumes of this storage class +- `reclaim_policy` (String) Indicates the type of the reclaim policy +- `volume_binding_mode` (String) Indicates when volume binding and dynamic provisioning should occur -The following arguments are supported: +### Read-Only -* `metadata` - (Required) Standard storage class's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `parameters` - (Optional) The parameters for the provisioner that should create volumes of this storage class. Read more about [available parameters](https://kubernetes.io/docs/concepts/storage/storage-classes/#parameters). -* `storage_provisioner` - (Required) Indicates the type of the provisioner -* `reclaim_policy` - (Optional) Indicates the reclaim policy to use. If no reclaimPolicy is specified when a StorageClass object is created, it will default to Delete. -* `volume_binding_mode` - (Optional) Indicates when volume binding and dynamic provisioning should occur. -* `allow_volume_expansion` - (Optional) Indicates whether the storage class allow volume expand, default true. -* `mount_options` - (Optional) Persistent Volumes that are dynamically created by a storage class will have the mount options specified. -* `allowed_topologies` - (Optional) Restrict the node topologies where volumes can be dynamically provisioned. See [allowed_topologies](#allowed_topologies) +- `id` (String) The ID of this resource. -## Nested Blocks + +### Nested Schema for `metadata` -### `metadata` +Optional: -#### Arguments +- `annotations` (Map of String) An unstructured key value map stored with the storage class that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the storage class. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the storage class, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `annotations` - (Optional) An unstructured key value map stored with the storage class that may be used to store arbitrary metadata. +Read-Only: -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this storage class that can be used by clients to determine when storage class has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this storage class. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the storage class. May match selectors of replication controllers and services. -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) + +### Nested Schema for `allowed_topologies` -* `name` - (Optional) Name of the storage class, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +Optional: -### `allowed_topologies` +- `match_label_expressions` (Block List) A list of topology selector requirements by labels. (see [below for nested schema](#nestedblock--allowed_topologies--match_label_expressions)) -#### Arguments + +### Nested Schema for `allowed_topologies.match_label_expressions` -* `match_label_expressions` - (Optional) A list of topology selector requirements by labels. See [match_label_expressions](#match_label_expressions) +Optional: -### `match_label_expressions` +- `key` (String) The label key that the selector applies to. +- `values` (Set of String) An array of string values. One value must match the label to be selected. -#### Arguments -* `key` - (Optional) The label key that the selector applies to. -* `values` - (Optional) An array of string values. One value must match the label to be selected. -#### Attributes + -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this storage class that can be used by clients to determine when storage class has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this storage class. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +## Example Usage + +```terraform +resource "kubernetes_storage_class" "example" { + metadata { + name = "terraform-example" + } + storage_provisioner = "kubernetes.io/gce-pd" + reclaim_policy = "Retain" + parameters = { + type = "pd-standard" + } + mount_options = ["file_mode=0700", "dir_mode=0777", "mfsymlinks", "uid=1000", "gid=1000", "nobrl", "cache=none"] +} +``` ## Import diff --git a/docs/resources/storage_class_v1.md b/docs/resources/storage_class_v1.md index 6e58eb14df..458b223fd0 100644 --- a/docs/resources/storage_class_v1.md +++ b/docs/resources/storage_class_v1.md @@ -7,74 +7,80 @@ description: |- # kubernetes_storage_class_v1 -Storage class is the foundation of dynamic provisioning, allowing cluster administrators to define abstractions for the underlying storage platform. +Storage class is the foundation of dynamic provisioning, allowing cluster administrators to define abstractions for the underlying storage platform. Read more [here] (https://kubernetes.io/blog/2017/03/dynamic-provisioning-and-storage-classes-kubernetes/) -Read more at https://kubernetes.io/blog/2017/03/dynamic-provisioning-and-storage-classes-kubernetes/ + +## Schema -## Example Usage +### Required -```terraform -resource "kubernetes_storage_class_v1" "example" { - metadata { - name = "terraform-example" - } - storage_provisioner = "kubernetes.io/gce-pd" - reclaim_policy = "Retain" - parameters = { - type = "pd-standard" - } - mount_options = ["file_mode=0700", "dir_mode=0777", "mfsymlinks", "uid=1000", "gid=1000", "nobrl", "cache=none"] -} -``` +- `metadata` (Block List, Min: 1, Max: 1) Standard storage class's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `storage_provisioner` (String) Indicates the type of the provisioner + +### Optional + +- `allow_volume_expansion` (Boolean) Indicates whether the storage class allow volume expand +- `allowed_topologies` (Block List, Max: 1) Restrict the node topologies where volumes can be dynamically provisioned. (see [below for nested schema](#nestedblock--allowed_topologies)) +- `mount_options` (Set of String) Persistent Volumes that are dynamically created by a storage class will have the mount options specified +- `parameters` (Map of String) The parameters for the provisioner that should create volumes of this storage class +- `reclaim_policy` (String) Indicates the type of the reclaim policy +- `volume_binding_mode` (String) Indicates when volume binding and dynamic provisioning should occur -## Argument Reference +### Read-Only -The following arguments are supported: +- `id` (String) The ID of this resource. -* `metadata` - (Required) Standard storage class's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `parameters` - (Optional) The parameters for the provisioner that should create volumes of this storage class. Read more about [available parameters](https://kubernetes.io/docs/concepts/storage/storage-classes/#parameters). -* `storage_provisioner` - (Required) Indicates the type of the provisioner -* `reclaim_policy` - (Optional) Indicates the reclaim policy to use. If no reclaimPolicy is specified when a StorageClass object is created, it will default to Delete. -* `volume_binding_mode` - (Optional) Indicates when volume binding and dynamic provisioning should occur. -* `allow_volume_expansion` - (Optional) Indicates whether the storage class allow volume expand, default true. -* `mount_options` - (Optional) Persistent Volumes that are dynamically created by a storage class will have the mount options specified. -* `allowed_topologies` - (Optional) Restrict the node topologies where volumes can be dynamically provisioned. See [allowed_topologies](#allowed_topologies) + +### Nested Schema for `metadata` -## Nested Blocks +Optional: -### `metadata` +- `annotations` (Map of String) An unstructured key value map stored with the storage class that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the storage class. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the storage class, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -#### Arguments +Read-Only: -* `annotations` - (Optional) An unstructured key value map stored with the storage class that may be used to store arbitrary metadata. +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this storage class that can be used by clients to determine when storage class has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this storage class. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the storage class. May match selectors of replication controllers and services. + +### Nested Schema for `allowed_topologies` -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) +Optional: -* `name` - (Optional) Name of the storage class, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) +- `match_label_expressions` (Block List) A list of topology selector requirements by labels. (see [below for nested schema](#nestedblock--allowed_topologies--match_label_expressions)) -### `allowed_topologies` + +### Nested Schema for `allowed_topologies.match_label_expressions` -#### Arguments +Optional: -* `match_label_expressions` - (Optional) A list of topology selector requirements by labels. See [match_label_expressions](#match_label_expressions) +- `key` (String) The label key that the selector applies to. +- `values` (Set of String) An array of string values. One value must match the label to be selected. -### `match_label_expressions` -#### Arguments -* `key` - (Optional) The label key that the selector applies to. -* `values` - (Optional) An array of string values. One value must match the label to be selected. -#### Attributes -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this storage class that can be used by clients to determine when storage class has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this storage class. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) +## Example Usage + +```terraform +resource "kubernetes_storage_class_v1" "example" { + metadata { + name = "terraform-example" + } + storage_provisioner = "kubernetes.io/gce-pd" + reclaim_policy = "Retain" + parameters = { + type = "pd-standard" + } + mount_options = ["file_mode=0700", "dir_mode=0777", "mfsymlinks", "uid=1000", "gid=1000", "nobrl", "cache=none"] +} +``` ## Import diff --git a/docs/resources/token_request_v1.md b/docs/resources/token_request_v1.md index 47017fa2b3..41cb69272e 100644 --- a/docs/resources/token_request_v1.md +++ b/docs/resources/token_request_v1.md @@ -9,6 +9,63 @@ description: |- TokenRequest requests a token for a given service account. + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard token request's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) + +### Optional + +- `spec` (Block List, Max: 1) (see [below for nested schema](#nestedblock--spec)) + +### Read-Only + +- `id` (String) The ID of this resource. +- `token` (String, Sensitive) Token is the opaque bearer token. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the token request that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the token request. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the token request, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +- `namespace` (String) Namespace defines the space within which name of the token request must be unique. + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this token request that can be used by clients to determine when token request has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this token request. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `spec` + +Optional: + +- `audiences` (List of String) Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences. +- `bound_object_ref` (Block List, Max: 1) BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation. (see [below for nested schema](#nestedblock--spec--bound_object_ref)) +- `expiration_seconds` (Number) expiration_seconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response. The expiration can't be less than 10 minutes. + + +### Nested Schema for `spec.bound_object_ref` + +Optional: + +- `api_version` (String) API version of the referent. +- `kind` (String) Kind of the referent. Valid kinds are 'Pod' and 'Secret'. +- `name` (String) Name of the referent. +- `uid` (String) UID of the referent. + + + + + ## Example Usage ```terraform @@ -36,48 +93,3 @@ output "tokenValue" { } ``` -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard role's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec holds information about the request being evaluated - -### Attributes - -* `token` - Token is the opaque bearer token. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](hhttps://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the role must be unique. - -### `spec` - -#### Arguments - -* `audiences` - (Optional) Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences. -* `expiration_seconds` - (Optional) ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response. -* `bound_object_ref` - (Optional) BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation. - -### `bound_object_ref` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. -* `kind` - (Optional) Kind of the referent. Valid kinds are 'Pod' and 'Secret'. -* `name` - (Optional) Name of the referent. -* `uid` - (Optional) UID of the referent. diff --git a/docs/resources/validating_webhook_configuration.md b/docs/resources/validating_webhook_configuration.md index ac857de084..4bf2f3f2fc 100644 --- a/docs/resources/validating_webhook_configuration.md +++ b/docs/resources/validating_webhook_configuration.md @@ -9,6 +9,185 @@ description: |- Validating Webhook Configuration configures a [validating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks). + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard validating webhook configuration's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `webhook` (Block List, Min: 1) Webhooks is a list of webhooks and the affected resources and operations. (see [below for nested schema](#nestedblock--webhook)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the validating webhook configuration that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the validating webhook configuration. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the validating webhook configuration, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this validating webhook configuration that can be used by clients to determine when validating webhook configuration has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this validating webhook configuration. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `webhook` + +Required: + +- `client_config` (Block List, Min: 1, Max: 1) ClientConfig defines how to communicate with the hook. Required (see [below for nested schema](#nestedblock--webhook--client_config)) +- `name` (String) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. Required. + +Optional: + +- `admission_review_versions` (List of String) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. +- `failure_policy` (String) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail. +- `match_policy` (String) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". + +- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + +- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + +Defaults to "Equivalent" + +- `namespace_selector` (Block List, Max: 1) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. + +For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { + "matchExpressions": [ + { + "key": "runlevel", + "operator": "NotIn", + "values": [ + "0", + "1" + ] + } + ] +} + +If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { + "matchExpressions": [ + { + "key": "environment", + "operator": "In", + "values": [ + "prod", + "staging" + ] + } + ] +} + +See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. + +Default to the empty LabelSelector, which matches everything. (see [below for nested schema](#nestedblock--webhook--namespace_selector)) + +- `object_selector` (Block List, Max: 1) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. (see [below for nested schema](#nestedblock--webhook--object_selector)) +- `rule` (Block List) Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. (see [below for nested schema](#nestedblock--webhook--rule)) +- `side_effects` (String) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. +- `timeout_seconds` (Number) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. + + +### Nested Schema for `webhook.client_config` + +Optional: + +- `ca_bundle` (String) `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. +- `service` (Block List, Max: 1) `service` is a reference to the service for this webhook. Either `service` or `url` must be specified. + +If the webhook is running within the cluster, then you should use `service`. (see [below for nested schema](#nestedblock--webhook--client_config--service)) + +- `url` (String) `url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. + +The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. + +Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. + +The scheme must be "https"; the URL must begin with "https://". + +A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. + +Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. + + +### Nested Schema for `webhook.client_config.service` + +Required: + +- `name` (String) `name` is the name of the service. Required +- `namespace` (String) `namespace` is the namespace of the service. Required + +Optional: + +- `path` (String) `path` is an optional URL path which will be sent in any request to this service. +- `port` (Number) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). + + + + +### Nested Schema for `webhook.namespace_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--webhook--namespace_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `webhook.namespace_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `webhook.object_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--webhook--object_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `webhook.object_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `webhook.rule` + +Required: + +- `api_groups` (List of String) +- `api_versions` (List of String) +- `operations` (List of String) Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. +- `resources` (List of String) + +Optional: + +- `scope` (String) + + + + + ## Example Usage ```terraform @@ -46,78 +225,6 @@ resource "kubernetes_validating_webhook_configuration" "example" { The provider supports clusters running either `v1` or `v1beta1` of the Admission Registration API. -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Validating Webhook Configuration metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `webhook` - (Required) A list of webhooks and the affected resources and operations. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Validating Webhook Configuration that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Validating Webhook Configuration. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Validating Webhook Configuration, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Validating Webhook Configuration that can be used by clients to determine when Validating Webhook Configuration has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Validating Webhook Configuration. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `webhook` - -#### Arguments - -* `admission_review_versions` - (Optional) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list are supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. -* `client_config` - (Required) ClientConfig defines how to communicate with the hook. -* `failure_policy` - (Optional) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - Allowed values are "Ignore" or "Fail". Defaults to "Fail". -* `match_policy` - (Optional) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to "Equivalent" -* `name` - (Required) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. -* `namespace_selector` - (Optional) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator": "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "environment", "operator": "In", "values": [ "prod", "staging" ] } ] } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. Default to the empty LabelSelector, which matches everything. -* `object_selector` - (Optional) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. -* `rule` - (Optional) Describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches *any* Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. -* `side_effects` - (Required) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. -* `timeout_seconds` - (Optional) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. - -### `client_config` - -#### Arguments - -* `ca_bundle` - (Optional) A PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. -* `service` - (Optional) A reference to the service for this webhook. Either `service` or `url` must be specified. If the webhook is running within the cluster, then you should use `service`. -* `url` - (Optional) Gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be "https"; the URL must begin with "https://". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. - -### `service` - -#### Arguments - -* `name` - (Required) The name of the service. -* `namespace` - (Required) The namespace of the service. -* `path` - (Optional) The URL path which will be sent in any request to this service. -* `port` - (Optional) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). - -### `rule` - -#### Arguments - -* `api_groups` - (Required) The API groups the resources belong to. '\*' is all groups. If '\*' is present, the length of the list must be one. -* `api_versions` - (Required) The API versions the resources belong to. '\*' is all versions. If '\*' is present, the length of the list must be one. -* `operations` - (Required) The operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '\*' is present, the length of the list must be one. -* `resources` - (Required) A list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '\*' means all resources, but not subresources. 'pods/\*' means all subresources of pods. '\*/scale' means all scale subresources. '\*/\*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. -* `scope` - (Optional) Specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". - ## Import Validating Webhook Configuration can be imported using the name, e.g. diff --git a/docs/resources/validating_webhook_configuration_v1.md b/docs/resources/validating_webhook_configuration_v1.md index e50f8e0327..36fde19051 100644 --- a/docs/resources/validating_webhook_configuration_v1.md +++ b/docs/resources/validating_webhook_configuration_v1.md @@ -9,6 +9,185 @@ description: |- Validating Webhook Configuration configures a [validating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks). + +## Schema + +### Required + +- `metadata` (Block List, Min: 1, Max: 1) Standard validating webhook configuration's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata)) +- `webhook` (Block List, Min: 1) Webhooks is a list of webhooks and the affected resources and operations. (see [below for nested schema](#nestedblock--webhook)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `metadata` + +Optional: + +- `annotations` (Map of String) An unstructured key value map stored with the validating webhook configuration that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +- `generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency +- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the validating webhook configuration. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +- `name` (String) Name of the validating webhook configuration, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +Read-Only: + +- `generation` (Number) A sequence number representing a specific generation of the desired state. +- `resource_version` (String) An opaque value that represents the internal version of this validating webhook configuration that can be used by clients to determine when validating webhook configuration has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +- `uid` (String) The unique in time and space value for this validating webhook configuration. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + + + +### Nested Schema for `webhook` + +Required: + +- `client_config` (Block List, Min: 1, Max: 1) ClientConfig defines how to communicate with the hook. Required (see [below for nested schema](#nestedblock--webhook--client_config)) +- `name` (String) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. Required. + +Optional: + +- `admission_review_versions` (List of String) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. +- `failure_policy` (String) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail. +- `match_policy` (String) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". + +- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + +- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + +Defaults to "Equivalent" + +- `namespace_selector` (Block List, Max: 1) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. + +For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { + "matchExpressions": [ + { + "key": "runlevel", + "operator": "NotIn", + "values": [ + "0", + "1" + ] + } + ] +} + +If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { + "matchExpressions": [ + { + "key": "environment", + "operator": "In", + "values": [ + "prod", + "staging" + ] + } + ] +} + +See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. + +Default to the empty LabelSelector, which matches everything. (see [below for nested schema](#nestedblock--webhook--namespace_selector)) + +- `object_selector` (Block List, Max: 1) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. (see [below for nested schema](#nestedblock--webhook--object_selector)) +- `rule` (Block List) Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. (see [below for nested schema](#nestedblock--webhook--rule)) +- `side_effects` (String) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. +- `timeout_seconds` (Number) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. + + +### Nested Schema for `webhook.client_config` + +Optional: + +- `ca_bundle` (String) `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. +- `service` (Block List, Max: 1) `service` is a reference to the service for this webhook. Either `service` or `url` must be specified. + +If the webhook is running within the cluster, then you should use `service`. (see [below for nested schema](#nestedblock--webhook--client_config--service)) + +- `url` (String) `url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. + +The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. + +Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. + +The scheme must be "https"; the URL must begin with "https://". + +A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. + +Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. + + +### Nested Schema for `webhook.client_config.service` + +Required: + +- `name` (String) `name` is the name of the service. Required +- `namespace` (String) `namespace` is the namespace of the service. Required + +Optional: + +- `path` (String) `path` is an optional URL path which will be sent in any request to this service. +- `port` (Number) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). + + + + +### Nested Schema for `webhook.namespace_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--webhook--namespace_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `webhook.namespace_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `webhook.object_selector` + +Optional: + +- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--webhook--object_selector--match_expressions)) +- `match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + + +### Nested Schema for `webhook.object_selector.match_expressions` + +Optional: + +- `key` (String) The label key that the selector applies to. +- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. +- `values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch. + + + + +### Nested Schema for `webhook.rule` + +Required: + +- `api_groups` (List of String) +- `api_versions` (List of String) +- `operations` (List of String) Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. +- `resources` (List of String) + +Optional: + +- `scope` (String) + + + + + ## Example Usage ```terraform @@ -46,78 +225,6 @@ resource "kubernetes_validating_webhook_configuration_v1" "example" { The provider supports clusters running either `v1` or `v1beta1` of the Admission Registration API. -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Validating Webhook Configuration metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `webhook` - (Required) A list of webhooks and the affected resources and operations. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Validating Webhook Configuration that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Validating Webhook Configuration. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Validating Webhook Configuration, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Validating Webhook Configuration that can be used by clients to determine when Validating Webhook Configuration has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Validating Webhook Configuration. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `webhook` - -#### Arguments - -* `admission_review_versions` - (Optional) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list are supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. -* `client_config` - (Required) ClientConfig defines how to communicate with the hook. -* `failure_policy` - (Optional) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - Allowed values are "Ignore" or "Fail". Defaults to "Fail". -* `match_policy` - (Optional) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to "Equivalent" -* `name` - (Required) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. -* `namespace_selector` - (Optional) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator": "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "environment", "operator": "In", "values": [ "prod", "staging" ] } ] } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. Default to the empty LabelSelector, which matches everything. -* `object_selector` - (Optional) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. -* `rule` - (Optional) Describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches *any* Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. -* `side_effects` - (Required) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. -* `timeout_seconds` - (Optional) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. - -### `client_config` - -#### Arguments - -* `ca_bundle` - (Optional) A PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. -* `service` - (Optional) A reference to the service for this webhook. Either `service` or `url` must be specified. If the webhook is running within the cluster, then you should use `service`. -* `url` - (Optional) Gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be "https"; the URL must begin with "https://". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. - -### `service` - -#### Arguments - -* `name` - (Required) The name of the service. -* `namespace` - (Required) The namespace of the service. -* `path` - (Optional) The URL path which will be sent in any request to this service. -* `port` - (Optional) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). - -### `rule` - -#### Arguments - -* `api_groups` - (Required) The API groups the resources belong to. '\*' is all groups. If '\*' is present, the length of the list must be one. -* `api_versions` - (Required) The API versions the resources belong to. '\*' is all versions. If '\*' is present, the length of the list must be one. -* `operations` - (Required) The operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '\*' is present, the length of the list must be one. -* `resources` - (Required) A list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '\*' means all resources, but not subresources. 'pods/\*' means all subresources of pods. '\*/scale' means all scale subresources. '\*/\*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. -* `scope` - (Optional) Specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". - ## Import Validating Webhook Configuration can be imported using the name, e.g. diff --git a/examples/data-sources/all_namespaces/example_1.tf b/examples/data-sources/all_namespaces/example_1.tf index ddd3457de5..d19a859ed8 100644 --- a/examples/data-sources/all_namespaces/example_1.tf +++ b/examples/data-sources/all_namespaces/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_all_namespaces" "allns" {} output "all-ns" { diff --git a/examples/data-sources/all_namespaces/example_2.tf b/examples/data-sources/all_namespaces/example_2.tf index 2994fe2f50..4066c8b054 100644 --- a/examples/data-sources/all_namespaces/example_2.tf +++ b/examples/data-sources/all_namespaces/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_all_namespaces" "allns" {} output "all-ns" { diff --git a/examples/data-sources/config_map/example_1.tf b/examples/data-sources/config_map/example_1.tf index 177367f44c..52cc89e1a5 100644 --- a/examples/data-sources/config_map/example_1.tf +++ b/examples/data-sources/config_map/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_config_map" "example" { metadata { name = "my-config" diff --git a/examples/data-sources/config_map/example_2.tf b/examples/data-sources/config_map/example_2.tf index 177367f44c..52cc89e1a5 100644 --- a/examples/data-sources/config_map/example_2.tf +++ b/examples/data-sources/config_map/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_config_map" "example" { metadata { name = "my-config" diff --git a/examples/data-sources/config_map_v1/example_1.tf b/examples/data-sources/config_map_v1/example_1.tf index c034d5c07f..cc8655553d 100644 --- a/examples/data-sources/config_map_v1/example_1.tf +++ b/examples/data-sources/config_map_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_config_map_v1" "example" { metadata { name = "my-config" diff --git a/examples/data-sources/config_map_v1/example_2.tf b/examples/data-sources/config_map_v1/example_2.tf index c034d5c07f..cc8655553d 100644 --- a/examples/data-sources/config_map_v1/example_2.tf +++ b/examples/data-sources/config_map_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_config_map_v1" "example" { metadata { name = "my-config" diff --git a/examples/data-sources/endpoints_v1/example_1.tf b/examples/data-sources/endpoints_v1/example_1.tf index 12ab564e91..80e58ccf62 100644 --- a/examples/data-sources/endpoints_v1/example_1.tf +++ b/examples/data-sources/endpoints_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_endpoints_v1" "api_endpoints" { metadata { name = "kubernetes" diff --git a/examples/data-sources/endpoints_v1/example_2.tf b/examples/data-sources/endpoints_v1/example_2.tf index 12ab564e91..80e58ccf62 100644 --- a/examples/data-sources/endpoints_v1/example_2.tf +++ b/examples/data-sources/endpoints_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_endpoints_v1" "api_endpoints" { metadata { name = "kubernetes" diff --git a/examples/data-sources/ingress/example_1.tf b/examples/data-sources/ingress/example_1.tf index b84bea90b1..6395e2763c 100644 --- a/examples/data-sources/ingress/example_1.tf +++ b/examples/data-sources/ingress/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_ingress" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/ingress/example_2.tf b/examples/data-sources/ingress/example_2.tf index b84bea90b1..6395e2763c 100644 --- a/examples/data-sources/ingress/example_2.tf +++ b/examples/data-sources/ingress/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_ingress" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/ingress_v1/example_1.tf b/examples/data-sources/ingress_v1/example_1.tf index 02126d157c..13998586b7 100644 --- a/examples/data-sources/ingress_v1/example_1.tf +++ b/examples/data-sources/ingress_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_ingress_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/ingress_v1/example_2.tf b/examples/data-sources/ingress_v1/example_2.tf index 02126d157c..13998586b7 100644 --- a/examples/data-sources/ingress_v1/example_2.tf +++ b/examples/data-sources/ingress_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_ingress_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/mutating_webhook_configuration_v1/example_1.tf b/examples/data-sources/mutating_webhook_configuration_v1/example_1.tf index f892a0a640..90d4003734 100644 --- a/examples/data-sources/mutating_webhook_configuration_v1/example_1.tf +++ b/examples/data-sources/mutating_webhook_configuration_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_mutating_webhook_configuration_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/mutating_webhook_configuration_v1/example_2.tf b/examples/data-sources/mutating_webhook_configuration_v1/example_2.tf index f892a0a640..90d4003734 100644 --- a/examples/data-sources/mutating_webhook_configuration_v1/example_2.tf +++ b/examples/data-sources/mutating_webhook_configuration_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_mutating_webhook_configuration_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/namespace/example_1.tf b/examples/data-sources/namespace/example_1.tf index 95afc122ec..1f6f411cf7 100644 --- a/examples/data-sources/namespace/example_1.tf +++ b/examples/data-sources/namespace/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_namespace" "example" { metadata { name = "kube-system" diff --git a/examples/data-sources/namespace/example_2.tf b/examples/data-sources/namespace/example_2.tf index 95afc122ec..1f6f411cf7 100644 --- a/examples/data-sources/namespace/example_2.tf +++ b/examples/data-sources/namespace/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_namespace" "example" { metadata { name = "kube-system" diff --git a/examples/data-sources/namespace_v1/example_1.tf b/examples/data-sources/namespace_v1/example_1.tf index e18f130e02..7cb15e2ed0 100644 --- a/examples/data-sources/namespace_v1/example_1.tf +++ b/examples/data-sources/namespace_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_namespace_v1" "example" { metadata { name = "kube-system" diff --git a/examples/data-sources/namespace_v1/example_2.tf b/examples/data-sources/namespace_v1/example_2.tf index e18f130e02..7cb15e2ed0 100644 --- a/examples/data-sources/namespace_v1/example_2.tf +++ b/examples/data-sources/namespace_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_namespace_v1" "example" { metadata { name = "kube-system" diff --git a/examples/data-sources/nodes/example_1.tf b/examples/data-sources/nodes/example_1.tf index 9bd35cf3c3..249e46028d 100644 --- a/examples/data-sources/nodes/example_1.tf +++ b/examples/data-sources/nodes/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_nodes" "example" {} output "node-ids" { diff --git a/examples/data-sources/nodes/example_2.tf b/examples/data-sources/nodes/example_2.tf index e4a697a026..ee82af5047 100644 --- a/examples/data-sources/nodes/example_2.tf +++ b/examples/data-sources/nodes/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_nodes" "example" { metadata { labels = { diff --git a/examples/data-sources/nodes/example_3.tf b/examples/data-sources/nodes/example_3.tf index 9bd35cf3c3..249e46028d 100644 --- a/examples/data-sources/nodes/example_3.tf +++ b/examples/data-sources/nodes/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_nodes" "example" {} output "node-ids" { diff --git a/examples/data-sources/nodes/example_4.tf b/examples/data-sources/nodes/example_4.tf index e4a697a026..ee82af5047 100644 --- a/examples/data-sources/nodes/example_4.tf +++ b/examples/data-sources/nodes/example_4.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_nodes" "example" { metadata { labels = { diff --git a/examples/data-sources/nodes/example_5.tf b/examples/data-sources/nodes/example_5.tf index 9bd35cf3c3..249e46028d 100644 --- a/examples/data-sources/nodes/example_5.tf +++ b/examples/data-sources/nodes/example_5.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_nodes" "example" {} output "node-ids" { diff --git a/examples/data-sources/nodes/example_6.tf b/examples/data-sources/nodes/example_6.tf index e4a697a026..ee82af5047 100644 --- a/examples/data-sources/nodes/example_6.tf +++ b/examples/data-sources/nodes/example_6.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_nodes" "example" { metadata { labels = { diff --git a/examples/data-sources/persistent_volume_claim/example_1.tf b/examples/data-sources/persistent_volume_claim/example_1.tf index aec628ca1f..d510cb1e06 100644 --- a/examples/data-sources/persistent_volume_claim/example_1.tf +++ b/examples/data-sources/persistent_volume_claim/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_persistent_volume_claim" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/persistent_volume_claim/example_2.tf b/examples/data-sources/persistent_volume_claim/example_2.tf index aec628ca1f..d510cb1e06 100644 --- a/examples/data-sources/persistent_volume_claim/example_2.tf +++ b/examples/data-sources/persistent_volume_claim/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_persistent_volume_claim" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/persistent_volume_claim_v1/example_1.tf b/examples/data-sources/persistent_volume_claim_v1/example_1.tf index 3a3b709259..86e253d1e3 100644 --- a/examples/data-sources/persistent_volume_claim_v1/example_1.tf +++ b/examples/data-sources/persistent_volume_claim_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_persistent_volume_claim_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/persistent_volume_claim_v1/example_2.tf b/examples/data-sources/persistent_volume_claim_v1/example_2.tf index 3a3b709259..86e253d1e3 100644 --- a/examples/data-sources/persistent_volume_claim_v1/example_2.tf +++ b/examples/data-sources/persistent_volume_claim_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_persistent_volume_claim_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/persistent_volume_v1/example_1.tf b/examples/data-sources/persistent_volume_v1/example_1.tf index 8116522f62..b91e3f23e5 100644 --- a/examples/data-sources/persistent_volume_v1/example_1.tf +++ b/examples/data-sources/persistent_volume_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_persistent_volume_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/persistent_volume_v1/example_2.tf b/examples/data-sources/persistent_volume_v1/example_2.tf index 8116522f62..b91e3f23e5 100644 --- a/examples/data-sources/persistent_volume_v1/example_2.tf +++ b/examples/data-sources/persistent_volume_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_persistent_volume_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/pod/example_1.tf b/examples/data-sources/pod/example_1.tf index 36c98f1b06..dfd9cac623 100644 --- a/examples/data-sources/pod/example_1.tf +++ b/examples/data-sources/pod/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resources { limits = {} requests = {} diff --git a/examples/data-sources/pod/example_2.tf b/examples/data-sources/pod/example_2.tf index 36c98f1b06..dfd9cac623 100644 --- a/examples/data-sources/pod/example_2.tf +++ b/examples/data-sources/pod/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resources { limits = {} requests = {} diff --git a/examples/data-sources/pod_v1/example_1.tf b/examples/data-sources/pod_v1/example_1.tf index 36c98f1b06..dfd9cac623 100644 --- a/examples/data-sources/pod_v1/example_1.tf +++ b/examples/data-sources/pod_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resources { limits = {} requests = {} diff --git a/examples/data-sources/pod_v1/example_2.tf b/examples/data-sources/pod_v1/example_2.tf index 36c98f1b06..dfd9cac623 100644 --- a/examples/data-sources/pod_v1/example_2.tf +++ b/examples/data-sources/pod_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resources { limits = {} requests = {} diff --git a/examples/data-sources/resource/example_1.tf b/examples/data-sources/resource/example_1.tf index 3ca9251c88..1e9c465d39 100644 --- a/examples/data-sources/resource/example_1.tf +++ b/examples/data-sources/resource/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_resource" "example" { api_version = "v1" kind = "ConfigMap" diff --git a/examples/data-sources/resource/example_2.tf b/examples/data-sources/resource/example_2.tf index 3ca9251c88..1e9c465d39 100644 --- a/examples/data-sources/resource/example_2.tf +++ b/examples/data-sources/resource/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_resource" "example" { api_version = "v1" kind = "ConfigMap" diff --git a/examples/data-sources/resources/example_1.tf b/examples/data-sources/resources/example_1.tf index 72543c4933..b3923985b7 100644 --- a/examples/data-sources/resources/example_1.tf +++ b/examples/data-sources/resources/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_resources" "example" { api_version = "v1" kind = "Namespace" diff --git a/examples/data-sources/resources/example_2.tf b/examples/data-sources/resources/example_2.tf index fe355d3d30..db1f848367 100644 --- a/examples/data-sources/resources/example_2.tf +++ b/examples/data-sources/resources/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_resources" "example" { api_version = "v1" kind = "Namespace" diff --git a/examples/data-sources/resources/example_3.tf b/examples/data-sources/resources/example_3.tf index 72543c4933..b3923985b7 100644 --- a/examples/data-sources/resources/example_3.tf +++ b/examples/data-sources/resources/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_resources" "example" { api_version = "v1" kind = "Namespace" diff --git a/examples/data-sources/resources/example_4.tf b/examples/data-sources/resources/example_4.tf index fe355d3d30..db1f848367 100644 --- a/examples/data-sources/resources/example_4.tf +++ b/examples/data-sources/resources/example_4.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_resources" "example" { api_version = "v1" kind = "Namespace" diff --git a/examples/data-sources/secret/example_1.tf b/examples/data-sources/secret/example_1.tf index 41d1957fac..122927200a 100644 --- a/examples/data-sources/secret/example_1.tf +++ b/examples/data-sources/secret/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_secret" "example" { metadata { name = "basic-auth" diff --git a/examples/data-sources/secret/example_2.tf b/examples/data-sources/secret/example_2.tf index f8376e4ce5..8fba7cfdd1 100644 --- a/examples/data-sources/secret/example_2.tf +++ b/examples/data-sources/secret/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_secret" "example" { metadata { name = "example-secret" diff --git a/examples/data-sources/secret/example_3.tf b/examples/data-sources/secret/example_3.tf index 41d1957fac..122927200a 100644 --- a/examples/data-sources/secret/example_3.tf +++ b/examples/data-sources/secret/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_secret" "example" { metadata { name = "basic-auth" diff --git a/examples/data-sources/secret/example_4.tf b/examples/data-sources/secret/example_4.tf index f8376e4ce5..8fba7cfdd1 100644 --- a/examples/data-sources/secret/example_4.tf +++ b/examples/data-sources/secret/example_4.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_secret" "example" { metadata { name = "example-secret" diff --git a/examples/data-sources/secret_v1/example_1.tf b/examples/data-sources/secret_v1/example_1.tf index fa5c80ebb5..e79186316e 100644 --- a/examples/data-sources/secret_v1/example_1.tf +++ b/examples/data-sources/secret_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_secret_v1" "example" { metadata { name = "basic-auth" diff --git a/examples/data-sources/secret_v1/example_2.tf b/examples/data-sources/secret_v1/example_2.tf index 42177e1949..6b043aaa1e 100644 --- a/examples/data-sources/secret_v1/example_2.tf +++ b/examples/data-sources/secret_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_secret_v1" "example" { metadata { name = "example-secret" diff --git a/examples/data-sources/secret_v1/example_3.tf b/examples/data-sources/secret_v1/example_3.tf index fa5c80ebb5..e79186316e 100644 --- a/examples/data-sources/secret_v1/example_3.tf +++ b/examples/data-sources/secret_v1/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_secret_v1" "example" { metadata { name = "basic-auth" diff --git a/examples/data-sources/secret_v1/example_4.tf b/examples/data-sources/secret_v1/example_4.tf index 42177e1949..6b043aaa1e 100644 --- a/examples/data-sources/secret_v1/example_4.tf +++ b/examples/data-sources/secret_v1/example_4.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_secret_v1" "example" { metadata { name = "example-secret" diff --git a/examples/data-sources/service/example_1.tf b/examples/data-sources/service/example_1.tf index befd88a24a..57694540c4 100644 --- a/examples/data-sources/service/example_1.tf +++ b/examples/data-sources/service/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_service" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/service/example_2.tf b/examples/data-sources/service/example_2.tf index befd88a24a..57694540c4 100644 --- a/examples/data-sources/service/example_2.tf +++ b/examples/data-sources/service/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_service" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/service_account/example_1.tf b/examples/data-sources/service_account/example_1.tf index c54bc54b5a..7ff47d0e3b 100644 --- a/examples/data-sources/service_account/example_1.tf +++ b/examples/data-sources/service_account/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_service_account" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/service_account/example_2.tf b/examples/data-sources/service_account/example_2.tf index c54bc54b5a..7ff47d0e3b 100644 --- a/examples/data-sources/service_account/example_2.tf +++ b/examples/data-sources/service_account/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_service_account" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/service_account_v1/example_1.tf b/examples/data-sources/service_account_v1/example_1.tf index 5a850f3008..7782a8779e 100644 --- a/examples/data-sources/service_account_v1/example_1.tf +++ b/examples/data-sources/service_account_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_service_account_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/service_account_v1/example_2.tf b/examples/data-sources/service_account_v1/example_2.tf index 5a850f3008..7782a8779e 100644 --- a/examples/data-sources/service_account_v1/example_2.tf +++ b/examples/data-sources/service_account_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_service_account_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/service_v1/example_1.tf b/examples/data-sources/service_v1/example_1.tf index d32df2fcdd..0028750d62 100644 --- a/examples/data-sources/service_v1/example_1.tf +++ b/examples/data-sources/service_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - data "kubernetes_service_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/data-sources/service_v1/example_2.tf b/examples/data-sources/service_v1/example_2.tf index d32df2fcdd..52e00a3c31 100644 --- a/examples/data-sources/service_v1/example_2.tf +++ b/examples/data-sources/service_v1/example_2.tf @@ -1,7 +1,4 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -data "kubernetes_service_v1" "example" { +=data "kubernetes_service_v1" "example" { metadata { name = "terraform-example" } diff --git a/examples/example_1.tf b/examples/example_1.tf index 8f131d5c66..78dcd9eb6c 100644 --- a/examples/example_1.tf +++ b/examples/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - provider "kubernetes" { config_path = "~/.kube/config" config_context = "my-context" diff --git a/examples/example_2.tf b/examples/example_2.tf index f0debda209..c4b7768187 100644 --- a/examples/example_2.tf +++ b/examples/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - provider "kubernetes" { config_path = "~/.kube/config" } diff --git a/examples/example_3.tf b/examples/example_3.tf index b8e74075f7..71cb566bc7 100644 --- a/examples/example_3.tf +++ b/examples/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - provider "kubernetes" { config_paths = [ "/path/to/config_a.yaml", diff --git a/examples/example_4.tf b/examples/example_4.tf index 779001ea46..a8471a9368 100644 --- a/examples/example_4.tf +++ b/examples/example_4.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - provider "kubernetes" { host = "https://cluster_endpoint:port" diff --git a/examples/example_5.tf b/examples/example_5.tf index d08e0945bf..d64d362945 100644 --- a/examples/example_5.tf +++ b/examples/example_5.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - provider "kubernetes" { host = var.cluster_endpoint cluster_ca_certificate = base64decode(var.cluster_ca_cert) diff --git a/examples/example_6.tf b/examples/example_6.tf index 2c97f11fae..a5a2c1aaa6 100644 --- a/examples/example_6.tf +++ b/examples/example_6.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_deployment_v1" "this" { // omit the resource config lifecycle { diff --git a/examples/example_7.tf b/examples/example_7.tf index b3d12e4720..72f2d7ad45 100644 --- a/examples/example_7.tf +++ b/examples/example_7.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - provider "kubernetes" { ignore_annotations = [ "cni\\.projectcalico\\.org\\/podIP", diff --git a/examples/example_8.tf b/examples/example_8.tf index 9b2ae17d86..673db28ab2 100644 --- a/examples/example_8.tf +++ b/examples/example_8.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - provider "kubernetes" { ignore_annotations = [ "^service\\.beta\\.kubernetes\\.io\\/aws-load-balancer.*", diff --git a/examples/functions/manifest_decode/example_1.tf b/examples/functions/manifest_decode/example_1.tf index 24cac293a2..8b3fac8a7f 100644 --- a/examples/functions/manifest_decode/example_1.tf +++ b/examples/functions/manifest_decode/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - # Configuration using provider functions must include required_providers configuration. terraform { required_providers { diff --git a/examples/functions/manifest_decode_multi/example_1.tf b/examples/functions/manifest_decode_multi/example_1.tf index f31bee5998..b30bc0da76 100644 --- a/examples/functions/manifest_decode_multi/example_1.tf +++ b/examples/functions/manifest_decode_multi/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - # Configuration using provider functions must include required_providers configuration. terraform { required_providers { diff --git a/examples/functions/manifest_encode/example_1.tf b/examples/functions/manifest_encode/example_1.tf index 69f50157fe..c00f95daa4 100644 --- a/examples/functions/manifest_encode/example_1.tf +++ b/examples/functions/manifest_encode/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - # Configuration using provider functions must include required_providers configuration. terraform { required_providers { diff --git a/examples/resources/annotations/example_1.tf b/examples/resources/annotations/example_1.tf index 259fafa75b..653ab01116 100644 --- a/examples/resources/annotations/example_1.tf +++ b/examples/resources/annotations/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_annotations" "example" { api_version = "v1" kind = "ConfigMap" diff --git a/examples/resources/annotations/example_2.tf b/examples/resources/annotations/example_2.tf index 4317247853..e52f85af5a 100644 --- a/examples/resources/annotations/example_2.tf +++ b/examples/resources/annotations/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_annotations" "example" { api_version = "apps/v1" kind = "Deployment" diff --git a/examples/resources/api_service/example_1.tf b/examples/resources/api_service/example_1.tf index 4bd73eedb8..7dedafa2e4 100644 --- a/examples/resources/api_service/example_1.tf +++ b/examples/resources/api_service/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_api_service" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/api_service_v1/example_1.tf b/examples/resources/api_service_v1/example_1.tf index 7f3647a8c3..09e3010938 100644 --- a/examples/resources/api_service_v1/example_1.tf +++ b/examples/resources/api_service_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_api_service_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/certificate_signing_request/example_1.tf b/examples/resources/certificate_signing_request/example_1.tf index 816e1bc15e..05a08ee58b 100644 --- a/examples/resources/certificate_signing_request/example_1.tf +++ b/examples/resources/certificate_signing_request/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_certificate_signing_request" "example" { metadata { name = "example" diff --git a/examples/resources/certificate_signing_request_v1/example_1.tf b/examples/resources/certificate_signing_request_v1/example_1.tf index 3fe6858716..b97e921b05 100644 --- a/examples/resources/certificate_signing_request_v1/example_1.tf +++ b/examples/resources/certificate_signing_request_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_certificate_signing_request_v1" "example" { metadata { name = "example" diff --git a/examples/resources/cluster_role/example_1.tf b/examples/resources/cluster_role/example_1.tf index dedd91428e..424d48ca28 100644 --- a/examples/resources/cluster_role/example_1.tf +++ b/examples/resources/cluster_role/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_cluster_role" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/cluster_role/example_2.tf b/examples/resources/cluster_role/example_2.tf index 3acd31c2ce..0c0a3ed4da 100644 --- a/examples/resources/cluster_role/example_2.tf +++ b/examples/resources/cluster_role/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_cluster_role" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/cluster_role_binding/example_1.tf b/examples/resources/cluster_role_binding/example_1.tf index 3757612885..b2aa472b9e 100644 --- a/examples/resources/cluster_role_binding/example_1.tf +++ b/examples/resources/cluster_role_binding/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_cluster_role_binding" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/cluster_role_binding_v1/example_1.tf b/examples/resources/cluster_role_binding_v1/example_1.tf index 4929c9df79..86e5eef146 100644 --- a/examples/resources/cluster_role_binding_v1/example_1.tf +++ b/examples/resources/cluster_role_binding_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_cluster_role_binding_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/cluster_role_v1/example_1.tf b/examples/resources/cluster_role_v1/example_1.tf index 76c63c78d4..df81775881 100644 --- a/examples/resources/cluster_role_v1/example_1.tf +++ b/examples/resources/cluster_role_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_cluster_role_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/cluster_role_v1/example_2.tf b/examples/resources/cluster_role_v1/example_2.tf index 5bc463ab8f..7217cd3e94 100644 --- a/examples/resources/cluster_role_v1/example_2.tf +++ b/examples/resources/cluster_role_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_cluster_role_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/config_map/example_1.tf b/examples/resources/config_map/example_1.tf index ef1876e1e1..6e545b90ff 100644 --- a/examples/resources/config_map/example_1.tf +++ b/examples/resources/config_map/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_config_map" "example" { metadata { name = "my-config" diff --git a/examples/resources/config_map_v1/example_1.tf b/examples/resources/config_map_v1/example_1.tf index e1aaa78038..167dbf8efc 100644 --- a/examples/resources/config_map_v1/example_1.tf +++ b/examples/resources/config_map_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_config_map_v1" "example" { metadata { name = "my-config" diff --git a/examples/resources/config_map_v1_data/example_1.tf b/examples/resources/config_map_v1_data/example_1.tf index f0b69d0513..913a976d7e 100644 --- a/examples/resources/config_map_v1_data/example_1.tf +++ b/examples/resources/config_map_v1_data/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_config_map_v1_data" "example" { metadata { name = "my-config" diff --git a/examples/resources/cron_job/example_1.tf b/examples/resources/cron_job/example_1.tf index 06a8dd92a2..6538bb6f71 100644 --- a/examples/resources/cron_job/example_1.tf +++ b/examples/resources/cron_job/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_cron_job" "demo" { metadata { name = "demo" diff --git a/examples/resources/cron_job_v1/example_1.tf b/examples/resources/cron_job_v1/example_1.tf index 1db7e2512a..08eaa66285 100644 --- a/examples/resources/cron_job_v1/example_1.tf +++ b/examples/resources/cron_job_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_cron_job_v1" "demo" { metadata { name = "demo" diff --git a/examples/resources/csi_driver/example_1.tf b/examples/resources/csi_driver/example_1.tf index 156f5774dd..dcd7f52ba6 100644 --- a/examples/resources/csi_driver/example_1.tf +++ b/examples/resources/csi_driver/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_csi_driver" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/csi_driver_v1/example_1.tf b/examples/resources/csi_driver_v1/example_1.tf index 01f96a21f7..fd969310e7 100644 --- a/examples/resources/csi_driver_v1/example_1.tf +++ b/examples/resources/csi_driver_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_csi_driver_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/daemon_set_v1/example_1.tf b/examples/resources/daemon_set_v1/example_1.tf index 001c2b59b1..27e072ea10 100644 --- a/examples/resources/daemon_set_v1/example_1.tf +++ b/examples/resources/daemon_set_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_daemon_set_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/daemon_set_v1/example_2.tf b/examples/resources/daemon_set_v1/example_2.tf index 36c98f1b06..dfd9cac623 100644 --- a/examples/resources/daemon_set_v1/example_2.tf +++ b/examples/resources/daemon_set_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resources { limits = {} requests = {} diff --git a/examples/resources/daemonset/example_1.tf b/examples/resources/daemonset/example_1.tf index 3c0559f953..8856027830 100644 --- a/examples/resources/daemonset/example_1.tf +++ b/examples/resources/daemonset/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_daemonset" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/daemonset/example_2.tf b/examples/resources/daemonset/example_2.tf index 36c98f1b06..dfd9cac623 100644 --- a/examples/resources/daemonset/example_2.tf +++ b/examples/resources/daemonset/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resources { limits = {} requests = {} diff --git a/examples/resources/default_service_account/example_1.tf b/examples/resources/default_service_account/example_1.tf index 4581dedb0e..2bb38396d2 100644 --- a/examples/resources/default_service_account/example_1.tf +++ b/examples/resources/default_service_account/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_default_service_account" "example" { metadata { namespace = "terraform-example" diff --git a/examples/resources/default_service_account_v1/example_1.tf b/examples/resources/default_service_account_v1/example_1.tf index ed07621bd0..4bfc556d5e 100644 --- a/examples/resources/default_service_account_v1/example_1.tf +++ b/examples/resources/default_service_account_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_default_service_account_v1" "example" { metadata { namespace = "terraform-example" diff --git a/examples/resources/deployment/example_1.tf b/examples/resources/deployment/example_1.tf index bc04942a18..b8b4b1c810 100644 --- a/examples/resources/deployment/example_1.tf +++ b/examples/resources/deployment/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_deployment" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/deployment/example_2.tf b/examples/resources/deployment/example_2.tf index 36c98f1b06..dfd9cac623 100644 --- a/examples/resources/deployment/example_2.tf +++ b/examples/resources/deployment/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resources { limits = {} requests = {} diff --git a/examples/resources/deployment_v1/example_1.tf b/examples/resources/deployment_v1/example_1.tf index a5e9a75973..ed1d4a9611 100644 --- a/examples/resources/deployment_v1/example_1.tf +++ b/examples/resources/deployment_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_deployment_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/deployment_v1/example_2.tf b/examples/resources/deployment_v1/example_2.tf index 36c98f1b06..dfd9cac623 100644 --- a/examples/resources/deployment_v1/example_2.tf +++ b/examples/resources/deployment_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resources { limits = {} requests = {} diff --git a/examples/resources/endpoint_slice_v1/example_1.tf b/examples/resources/endpoint_slice_v1/example_1.tf index a734274913..3c791f17a9 100644 --- a/examples/resources/endpoint_slice_v1/example_1.tf +++ b/examples/resources/endpoint_slice_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_endpoint_slice_v1" "test" { metadata { name = "test" diff --git a/examples/resources/endpoints/example_1.tf b/examples/resources/endpoints/example_1.tf index 694875f767..c019037991 100644 --- a/examples/resources/endpoints/example_1.tf +++ b/examples/resources/endpoints/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_endpoints" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/endpoints_v1/example_1.tf b/examples/resources/endpoints_v1/example_1.tf index d86fd1ab42..e22f08860d 100644 --- a/examples/resources/endpoints_v1/example_1.tf +++ b/examples/resources/endpoints_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_endpoints_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/env/example_1.tf b/examples/resources/env/example_1.tf index 7bb603273a..e051e2d503 100644 --- a/examples/resources/env/example_1.tf +++ b/examples/resources/env/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_env" "example" { container = "nginx" metadata { diff --git a/examples/resources/horizontal_pod_autoscaler/example_1.tf b/examples/resources/horizontal_pod_autoscaler/example_1.tf index ac3a144f24..dc2771b861 100644 --- a/examples/resources/horizontal_pod_autoscaler/example_1.tf +++ b/examples/resources/horizontal_pod_autoscaler/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_horizontal_pod_autoscaler" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/horizontal_pod_autoscaler/example_2.tf b/examples/resources/horizontal_pod_autoscaler/example_2.tf index 4c5b82c969..05b24ac36c 100644 --- a/examples/resources/horizontal_pod_autoscaler/example_2.tf +++ b/examples/resources/horizontal_pod_autoscaler/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_horizontal_pod_autoscaler" "example" { metadata { name = "test" diff --git a/examples/resources/horizontal_pod_autoscaler/example_3.tf b/examples/resources/horizontal_pod_autoscaler/example_3.tf index 60156406a5..21cb4ef476 100644 --- a/examples/resources/horizontal_pod_autoscaler/example_3.tf +++ b/examples/resources/horizontal_pod_autoscaler/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_horizontal_pod_autoscaler" "example" { metadata { name = "test" diff --git a/examples/resources/horizontal_pod_autoscaler_v1/example_1.tf b/examples/resources/horizontal_pod_autoscaler_v1/example_1.tf index 62a4746f7b..8936109bf1 100644 --- a/examples/resources/horizontal_pod_autoscaler_v1/example_1.tf +++ b/examples/resources/horizontal_pod_autoscaler_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_horizontal_pod_autoscaler_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/horizontal_pod_autoscaler_v2/example_1.tf b/examples/resources/horizontal_pod_autoscaler_v2/example_1.tf index 41a75221fd..5c508d487a 100644 --- a/examples/resources/horizontal_pod_autoscaler_v2/example_1.tf +++ b/examples/resources/horizontal_pod_autoscaler_v2/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_horizontal_pod_autoscaler_v2" "example" { metadata { name = "test" diff --git a/examples/resources/horizontal_pod_autoscaler_v2/example_2.tf b/examples/resources/horizontal_pod_autoscaler_v2/example_2.tf index e56cbd5f63..aae967c3b1 100644 --- a/examples/resources/horizontal_pod_autoscaler_v2/example_2.tf +++ b/examples/resources/horizontal_pod_autoscaler_v2/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_horizontal_pod_autoscaler_v2" "example" { metadata { name = "test" diff --git a/examples/resources/horizontal_pod_autoscaler_v2beta2/example_1.tf b/examples/resources/horizontal_pod_autoscaler_v2beta2/example_1.tf index 5be1e8e36f..fe62ab1196 100644 --- a/examples/resources/horizontal_pod_autoscaler_v2beta2/example_1.tf +++ b/examples/resources/horizontal_pod_autoscaler_v2beta2/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_horizontal_pod_autoscaler_v2beta2" "example" { metadata { name = "test" diff --git a/examples/resources/horizontal_pod_autoscaler_v2beta2/example_2.tf b/examples/resources/horizontal_pod_autoscaler_v2beta2/example_2.tf index 782621b24b..8063d273c1 100644 --- a/examples/resources/horizontal_pod_autoscaler_v2beta2/example_2.tf +++ b/examples/resources/horizontal_pod_autoscaler_v2beta2/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_horizontal_pod_autoscaler_v2beta2" "example" { metadata { name = "test" diff --git a/examples/resources/ingress/example_1.tf b/examples/resources/ingress/example_1.tf index 1a3f359d30..405999834c 100644 --- a/examples/resources/ingress/example_1.tf +++ b/examples/resources/ingress/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_ingress" "example_ingress" { metadata { name = "example-ingress" diff --git a/examples/resources/ingress/example_2.tf b/examples/resources/ingress/example_2.tf index 01a8647c70..4365f2a71d 100644 --- a/examples/resources/ingress/example_2.tf +++ b/examples/resources/ingress/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_service" "example" { metadata { name = "ingress-service" diff --git a/examples/resources/ingress_class/example_1.tf b/examples/resources/ingress_class/example_1.tf index 71fee79b71..07ffc97f6d 100644 --- a/examples/resources/ingress_class/example_1.tf +++ b/examples/resources/ingress_class/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_ingress_class" "example" { metadata { name = "example" diff --git a/examples/resources/ingress_class_v1/example_1.tf b/examples/resources/ingress_class_v1/example_1.tf index 2b7ee50bdc..489a27e555 100644 --- a/examples/resources/ingress_class_v1/example_1.tf +++ b/examples/resources/ingress_class_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_ingress_class_v1" "example" { metadata { name = "example" diff --git a/examples/resources/ingress_v1/example_1.tf b/examples/resources/ingress_v1/example_1.tf index 980f28ee47..28697f232b 100644 --- a/examples/resources/ingress_v1/example_1.tf +++ b/examples/resources/ingress_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_ingress_v1" "example_ingress" { metadata { name = "example-ingress" diff --git a/examples/resources/ingress_v1/example_2.tf b/examples/resources/ingress_v1/example_2.tf index 224772ed7d..274a6ca5fc 100644 --- a/examples/resources/ingress_v1/example_2.tf +++ b/examples/resources/ingress_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_service_v1" "example" { metadata { name = "ingress-service" diff --git a/examples/resources/job/example_1.tf b/examples/resources/job/example_1.tf index e26ffc8cfb..ef8557d607 100644 --- a/examples/resources/job/example_1.tf +++ b/examples/resources/job/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_job" "demo" { metadata { name = "demo" diff --git a/examples/resources/job/example_2.tf b/examples/resources/job/example_2.tf index 4adfa9b689..ba9d841678 100644 --- a/examples/resources/job/example_2.tf +++ b/examples/resources/job/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_job" "demo" { metadata { name = "demo" diff --git a/examples/resources/job_v1/example_1.tf b/examples/resources/job_v1/example_1.tf index 4b8919aef9..a55181799a 100644 --- a/examples/resources/job_v1/example_1.tf +++ b/examples/resources/job_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_job_v1" "demo" { metadata { name = "demo" diff --git a/examples/resources/job_v1/example_2.tf b/examples/resources/job_v1/example_2.tf index b2dd0a0188..0bd402e583 100644 --- a/examples/resources/job_v1/example_2.tf +++ b/examples/resources/job_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_job_v1" "demo" { metadata { name = "demo" diff --git a/examples/resources/labels/example_1.tf b/examples/resources/labels/example_1.tf index e3409a2c02..51367ef667 100644 --- a/examples/resources/labels/example_1.tf +++ b/examples/resources/labels/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_labels" "example" { api_version = "v1" kind = "ConfigMap" diff --git a/examples/resources/limit_range/example_1.tf b/examples/resources/limit_range/example_1.tf index b9bb506439..21ce73357f 100644 --- a/examples/resources/limit_range/example_1.tf +++ b/examples/resources/limit_range/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_limit_range" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/limit_range_v1/example_1.tf b/examples/resources/limit_range_v1/example_1.tf index e3b12fca25..81894bc8d1 100644 --- a/examples/resources/limit_range_v1/example_1.tf +++ b/examples/resources/limit_range_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_limit_range_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/manifest/example_1.tf b/examples/resources/manifest/example_1.tf index 18a5f19cad..531941e681 100644 --- a/examples/resources/manifest/example_1.tf +++ b/examples/resources/manifest/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_manifest" "test-configmap" { manifest = { "apiVersion" = "v1" diff --git a/examples/resources/manifest/example_2.tf b/examples/resources/manifest/example_2.tf index 02667d57b9..097561e3bc 100644 --- a/examples/resources/manifest/example_2.tf +++ b/examples/resources/manifest/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_manifest" "test-crd" { manifest = { apiVersion = "apiextensions.k8s.io/v1" diff --git a/examples/resources/manifest/example_3.tf b/examples/resources/manifest/example_3.tf index 4f17ab1b3f..d76b5eac6e 100644 --- a/examples/resources/manifest/example_3.tf +++ b/examples/resources/manifest/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_manifest" "test" { manifest = { // ... diff --git a/examples/resources/manifest/example_4.tf b/examples/resources/manifest/example_4.tf index 729613ea71..e984233b43 100644 --- a/examples/resources/manifest/example_4.tf +++ b/examples/resources/manifest/example_4.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_manifest" "test" { manifest = { // ... diff --git a/examples/resources/manifest/example_5.tf b/examples/resources/manifest/example_5.tf index b3de38d407..1c18d569a1 100644 --- a/examples/resources/manifest/example_5.tf +++ b/examples/resources/manifest/example_5.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_manifest" "test" { manifest = { // ... diff --git a/examples/resources/manifest/example_6.tf b/examples/resources/manifest/example_6.tf index 5d0a4d38e6..b80d400c3f 100644 --- a/examples/resources/manifest/example_6.tf +++ b/examples/resources/manifest/example_6.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_manifest" "test" { provider = kubernetes-alpha diff --git a/examples/resources/mutating_webhook_configuration/example_1.tf b/examples/resources/mutating_webhook_configuration/example_1.tf index 1595fe1cf9..5289cb5542 100644 --- a/examples/resources/mutating_webhook_configuration/example_1.tf +++ b/examples/resources/mutating_webhook_configuration/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_mutating_webhook_configuration" "example" { metadata { name = "test.terraform.io" diff --git a/examples/resources/mutating_webhook_configuration_v1/example_1.tf b/examples/resources/mutating_webhook_configuration_v1/example_1.tf index f0c214d357..b83e40aeb1 100644 --- a/examples/resources/mutating_webhook_configuration_v1/example_1.tf +++ b/examples/resources/mutating_webhook_configuration_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_mutating_webhook_configuration_v1" "example" { metadata { name = "test.terraform.io" diff --git a/examples/resources/namespace/example_1.tf b/examples/resources/namespace/example_1.tf index 85bd2cf0f0..cf4bf209db 100644 --- a/examples/resources/namespace/example_1.tf +++ b/examples/resources/namespace/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_namespace" "example" { metadata { annotations = { diff --git a/examples/resources/namespace_v1/example_1.tf b/examples/resources/namespace_v1/example_1.tf index 4fa27126aa..14202e9d72 100644 --- a/examples/resources/namespace_v1/example_1.tf +++ b/examples/resources/namespace_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_namespace_v1" "example" { metadata { annotations = { diff --git a/examples/resources/network_policy/example_1.tf b/examples/resources/network_policy/example_1.tf index aec2aaab73..3389e09c0b 100644 --- a/examples/resources/network_policy/example_1.tf +++ b/examples/resources/network_policy/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_network_policy" "example" { metadata { name = "terraform-example-network-policy" diff --git a/examples/resources/network_policy_v1/example_1.tf b/examples/resources/network_policy_v1/example_1.tf index 74c49d0b27..6625b93c3e 100644 --- a/examples/resources/network_policy_v1/example_1.tf +++ b/examples/resources/network_policy_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_network_policy_v1" "example" { metadata { name = "terraform-example-network-policy" diff --git a/examples/resources/node_taint/example_1.tf b/examples/resources/node_taint/example_1.tf index 2d3cb44d93..5a7cc2cfe2 100644 --- a/examples/resources/node_taint/example_1.tf +++ b/examples/resources/node_taint/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_node_taint" "example" { metadata { name = "my-node.my-cluster.k8s.local" diff --git a/examples/resources/persistent_volume/example_1.tf b/examples/resources/persistent_volume/example_1.tf index a6374f7c49..b401ecd390 100644 --- a/examples/resources/persistent_volume/example_1.tf +++ b/examples/resources/persistent_volume/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_persistent_volume" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/persistent_volume/example_2.tf b/examples/resources/persistent_volume/example_2.tf index c824ef5525..33de5424f6 100644 --- a/examples/resources/persistent_volume/example_2.tf +++ b/examples/resources/persistent_volume/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_persistent_volume" "example" { metadata { name = "example" diff --git a/examples/resources/persistent_volume_claim/example_1.tf b/examples/resources/persistent_volume_claim/example_1.tf index b6522b6c13..1856a05e66 100644 --- a/examples/resources/persistent_volume_claim/example_1.tf +++ b/examples/resources/persistent_volume_claim/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_persistent_volume_claim" "example" { metadata { name = "exampleclaimname" diff --git a/examples/resources/persistent_volume_claim_v1/example_1.tf b/examples/resources/persistent_volume_claim_v1/example_1.tf index acbf95d6ae..82d09444e4 100644 --- a/examples/resources/persistent_volume_claim_v1/example_1.tf +++ b/examples/resources/persistent_volume_claim_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_persistent_volume_claim_v1" "example" { metadata { name = "exampleclaimname" diff --git a/examples/resources/persistent_volume_v1/example_1.tf b/examples/resources/persistent_volume_v1/example_1.tf index 8220d48101..f9b611b7c5 100644 --- a/examples/resources/persistent_volume_v1/example_1.tf +++ b/examples/resources/persistent_volume_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_persistent_volume_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/persistent_volume_v1/example_2.tf b/examples/resources/persistent_volume_v1/example_2.tf index 1149cef3f6..ae35414eb1 100644 --- a/examples/resources/persistent_volume_v1/example_2.tf +++ b/examples/resources/persistent_volume_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_persistent_volume_v1" "example" { metadata { name = "example" diff --git a/examples/resources/pod/example_1.tf b/examples/resources/pod/example_1.tf index 21a0a02dff..a6c55c3779 100644 --- a/examples/resources/pod/example_1.tf +++ b/examples/resources/pod/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_pod" "test" { metadata { name = "terraform-example" diff --git a/examples/resources/pod/example_2.tf b/examples/resources/pod/example_2.tf index cb07765236..d0dd375501 100644 --- a/examples/resources/pod/example_2.tf +++ b/examples/resources/pod/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_pod" "with_node_affinity" { metadata { name = "with-node-affinity" diff --git a/examples/resources/pod/example_3.tf b/examples/resources/pod/example_3.tf index 04a46799e9..dc1d3d794f 100644 --- a/examples/resources/pod/example_3.tf +++ b/examples/resources/pod/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_pod" "with_pod_affinity" { metadata { name = "with-pod-affinity" diff --git a/examples/resources/pod/example_4.tf b/examples/resources/pod/example_4.tf index 36c98f1b06..dfd9cac623 100644 --- a/examples/resources/pod/example_4.tf +++ b/examples/resources/pod/example_4.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resources { limits = {} requests = {} diff --git a/examples/resources/pod_disruption_budget/example_1.tf b/examples/resources/pod_disruption_budget/example_1.tf index cc964264d3..65c5a1644d 100644 --- a/examples/resources/pod_disruption_budget/example_1.tf +++ b/examples/resources/pod_disruption_budget/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_pod_disruption_budget" "demo" { metadata { name = "demo" diff --git a/examples/resources/pod_disruption_budget_v1/example_1.tf b/examples/resources/pod_disruption_budget_v1/example_1.tf index a2d29b68c4..1bcdb50c84 100644 --- a/examples/resources/pod_disruption_budget_v1/example_1.tf +++ b/examples/resources/pod_disruption_budget_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_pod_disruption_budget_v1" "demo" { metadata { name = "demo" diff --git a/examples/resources/pod_security_policy/example_1.tf b/examples/resources/pod_security_policy/example_1.tf index bf646b3b02..f166b3c086 100644 --- a/examples/resources/pod_security_policy/example_1.tf +++ b/examples/resources/pod_security_policy/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_pod_security_policy" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/pod_security_policy_v1beta1/example_1.tf b/examples/resources/pod_security_policy_v1beta1/example_1.tf index 907793c0a4..9ac7b6fd09 100644 --- a/examples/resources/pod_security_policy_v1beta1/example_1.tf +++ b/examples/resources/pod_security_policy_v1beta1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_pod_security_policy_v1beta1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/pod_v1/example_1.tf b/examples/resources/pod_v1/example_1.tf index 73ec70f65c..b3deb6a82c 100644 --- a/examples/resources/pod_v1/example_1.tf +++ b/examples/resources/pod_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_pod_v1" "test" { metadata { name = "terraform-example" diff --git a/examples/resources/pod_v1/example_2.tf b/examples/resources/pod_v1/example_2.tf index 24cf3d2c71..833fb69180 100644 --- a/examples/resources/pod_v1/example_2.tf +++ b/examples/resources/pod_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_pod_v1" "with_node_affinity" { metadata { name = "with-node-affinity" diff --git a/examples/resources/pod_v1/example_3.tf b/examples/resources/pod_v1/example_3.tf index d5d53c2883..0b9763de81 100644 --- a/examples/resources/pod_v1/example_3.tf +++ b/examples/resources/pod_v1/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_pod_v1" "with_pod_affinity" { metadata { name = "with-pod-affinity" diff --git a/examples/resources/pod_v1/example_4.tf b/examples/resources/pod_v1/example_4.tf index 36c98f1b06..dfd9cac623 100644 --- a/examples/resources/pod_v1/example_4.tf +++ b/examples/resources/pod_v1/example_4.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resources { limits = {} requests = {} diff --git a/examples/resources/priority_class/example_1.tf b/examples/resources/priority_class/example_1.tf index eabfb8b21e..43d81aac24 100644 --- a/examples/resources/priority_class/example_1.tf +++ b/examples/resources/priority_class/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_priority_class" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/priority_class_v1/example_1.tf b/examples/resources/priority_class_v1/example_1.tf index 191db962da..992880813e 100644 --- a/examples/resources/priority_class_v1/example_1.tf +++ b/examples/resources/priority_class_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_priority_class_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/replication_controller/example_1.tf b/examples/resources/replication_controller/example_1.tf index b1415bd2d8..9323ab3f28 100644 --- a/examples/resources/replication_controller/example_1.tf +++ b/examples/resources/replication_controller/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_replication_controller" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/replication_controller_v1/example_1.tf b/examples/resources/replication_controller_v1/example_1.tf index 497285ea96..abaae033cd 100644 --- a/examples/resources/replication_controller_v1/example_1.tf +++ b/examples/resources/replication_controller_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_replication_controller_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/resource_quota/example_1.tf b/examples/resources/resource_quota/example_1.tf index b05805b90c..299dc51b49 100644 --- a/examples/resources/resource_quota/example_1.tf +++ b/examples/resources/resource_quota/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_resource_quota" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/resource_quota_v1/example_1.tf b/examples/resources/resource_quota_v1/example_1.tf index c95a9c5c22..dcf6068f8b 100644 --- a/examples/resources/resource_quota_v1/example_1.tf +++ b/examples/resources/resource_quota_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_resource_quota_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/role/example_1.tf b/examples/resources/role/example_1.tf index e59be04a92..f90de87054 100644 --- a/examples/resources/role/example_1.tf +++ b/examples/resources/role/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_role" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/role_binding/example_1.tf b/examples/resources/role_binding/example_1.tf index ef8a3805a3..5edbd15d83 100644 --- a/examples/resources/role_binding/example_1.tf +++ b/examples/resources/role_binding/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_role_binding" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/role_binding_v1/example_1.tf b/examples/resources/role_binding_v1/example_1.tf index c8f36198e5..d0f2ea38db 100644 --- a/examples/resources/role_binding_v1/example_1.tf +++ b/examples/resources/role_binding_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_role_binding_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/role_v1/example_1.tf b/examples/resources/role_v1/example_1.tf index a027e9a29a..1cac9d340c 100644 --- a/examples/resources/role_v1/example_1.tf +++ b/examples/resources/role_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_role_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/runtime_class_v1/example_1.tf b/examples/resources/runtime_class_v1/example_1.tf index 7a404b05d8..e0af7ca638 100644 --- a/examples/resources/runtime_class_v1/example_1.tf +++ b/examples/resources/runtime_class_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_runtime_class_v1" "example" { metadata { name = "myclass" diff --git a/examples/resources/secret/example_1.tf b/examples/resources/secret/example_1.tf index d14d11a7fe..dff9bc0694 100644 --- a/examples/resources/secret/example_1.tf +++ b/examples/resources/secret/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_secret" "example" { metadata { name = "basic-auth" diff --git a/examples/resources/secret/example_2.tf b/examples/resources/secret/example_2.tf index 60ab2cfedf..b103205978 100644 --- a/examples/resources/secret/example_2.tf +++ b/examples/resources/secret/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_secret" "example" { metadata { name = "docker-cfg" diff --git a/examples/resources/secret/example_3.tf b/examples/resources/secret/example_3.tf index aba8e2b330..31e6ad98ff 100644 --- a/examples/resources/secret/example_3.tf +++ b/examples/resources/secret/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_secret" "example" { metadata { name = "docker-cfg" diff --git a/examples/resources/secret/example_4.tf b/examples/resources/secret/example_4.tf index d0844038e8..8486be86c0 100644 --- a/examples/resources/secret/example_4.tf +++ b/examples/resources/secret/example_4.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_secret" "example" { metadata { annotations = { diff --git a/examples/resources/secret_v1/example_1.tf b/examples/resources/secret_v1/example_1.tf index e5c87f5ca0..44c71d7bc7 100644 --- a/examples/resources/secret_v1/example_1.tf +++ b/examples/resources/secret_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_secret_v1" "example" { metadata { name = "basic-auth" diff --git a/examples/resources/secret_v1/example_2.tf b/examples/resources/secret_v1/example_2.tf index fdce93c9d7..3ca0cb0a80 100644 --- a/examples/resources/secret_v1/example_2.tf +++ b/examples/resources/secret_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_secret_v1" "example" { metadata { name = "docker-cfg" diff --git a/examples/resources/secret_v1/example_3.tf b/examples/resources/secret_v1/example_3.tf index 65ceaf2d6e..faf7913973 100644 --- a/examples/resources/secret_v1/example_3.tf +++ b/examples/resources/secret_v1/example_3.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_secret_v1" "example" { metadata { name = "docker-cfg" diff --git a/examples/resources/secret_v1/example_4.tf b/examples/resources/secret_v1/example_4.tf index af76aa22bd..4fc48a93b3 100644 --- a/examples/resources/secret_v1/example_4.tf +++ b/examples/resources/secret_v1/example_4.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_secret_v1" "example" { metadata { annotations = { diff --git a/examples/resources/service/example_1.tf b/examples/resources/service/example_1.tf index 03f893f803..bb46e81d77 100644 --- a/examples/resources/service/example_1.tf +++ b/examples/resources/service/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_service" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/service/example_2.tf b/examples/resources/service/example_2.tf index 260eb2ce66..9df54e2249 100644 --- a/examples/resources/service/example_2.tf +++ b/examples/resources/service/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - variable "cluster_name" { type = string } diff --git a/examples/resources/service_account/example_1.tf b/examples/resources/service_account/example_1.tf index 94893655c6..a92d21d628 100644 --- a/examples/resources/service_account/example_1.tf +++ b/examples/resources/service_account/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_service_account" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/service_account_v1/example_1.tf b/examples/resources/service_account_v1/example_1.tf index 41e4d61084..05d3cf9a87 100644 --- a/examples/resources/service_account_v1/example_1.tf +++ b/examples/resources/service_account_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_service_account_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/service_v1/example_1.tf b/examples/resources/service_v1/example_1.tf index 7c1636e4e1..f7bc1044b0 100644 --- a/examples/resources/service_v1/example_1.tf +++ b/examples/resources/service_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_service_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/service_v1/example_2.tf b/examples/resources/service_v1/example_2.tf index 831cf03dab..95cc122360 100644 --- a/examples/resources/service_v1/example_2.tf +++ b/examples/resources/service_v1/example_2.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - variable "cluster_name" { type = string } diff --git a/examples/resources/stateful_set/example_1.tf b/examples/resources/stateful_set/example_1.tf index 30513d3e5e..084ccc91db 100644 --- a/examples/resources/stateful_set/example_1.tf +++ b/examples/resources/stateful_set/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_stateful_set" "prometheus" { metadata { annotations = { diff --git a/examples/resources/stateful_set_v1/example_1.tf b/examples/resources/stateful_set_v1/example_1.tf index 440f7742a7..ff69ab2d40 100644 --- a/examples/resources/stateful_set_v1/example_1.tf +++ b/examples/resources/stateful_set_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_stateful_set_v1" "prometheus" { metadata { annotations = { diff --git a/examples/resources/storage_class/example_1.tf b/examples/resources/storage_class/example_1.tf index 24fdaa10a5..508861190e 100644 --- a/examples/resources/storage_class/example_1.tf +++ b/examples/resources/storage_class/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_storage_class" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/storage_class_v1/example_1.tf b/examples/resources/storage_class_v1/example_1.tf index 5fb6df37b7..6d59f1d8d8 100644 --- a/examples/resources/storage_class_v1/example_1.tf +++ b/examples/resources/storage_class_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_storage_class_v1" "example" { metadata { name = "terraform-example" diff --git a/examples/resources/token_request_v1/example_1.tf b/examples/resources/token_request_v1/example_1.tf index 162585ddeb..6e3e994881 100644 --- a/examples/resources/token_request_v1/example_1.tf +++ b/examples/resources/token_request_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_service_account_v1" "test" { metadata { name = "test" diff --git a/examples/resources/validating_webhook_configuration/example_1.tf b/examples/resources/validating_webhook_configuration/example_1.tf index 6d94b6c866..f5f2d3e8e4 100644 --- a/examples/resources/validating_webhook_configuration/example_1.tf +++ b/examples/resources/validating_webhook_configuration/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_validating_webhook_configuration" "example" { metadata { name = "test.terraform.io" diff --git a/examples/resources/validating_webhook_configuration_v1/example_1.tf b/examples/resources/validating_webhook_configuration_v1/example_1.tf index aa22702116..d83101bfe8 100644 --- a/examples/resources/validating_webhook_configuration_v1/example_1.tf +++ b/examples/resources/validating_webhook_configuration_v1/example_1.tf @@ -1,6 +1,3 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - resource "kubernetes_validating_webhook_configuration_v1" "example" { metadata { name = "test.terraform.io" diff --git a/kubernetes/resource_kubernetes_annotations.go b/kubernetes/resource_kubernetes_annotations.go index c3f3ef9e52..7333f09fb9 100644 --- a/kubernetes/resource_kubernetes_annotations.go +++ b/kubernetes/resource_kubernetes_annotations.go @@ -26,6 +26,7 @@ import ( func resourceKubernetesAnnotations() *schema.Resource { return &schema.Resource{ + Description: "This resource allows Terraform to manage the annotations for a resource that already exists. This resource uses [field management](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) to manage only the annotations that are defined in the Terraform configuration. Existing annotations not specified in the configuration will be ignored. If an annotation specified in the config and is already managed by another client it will cause a conflict which can be overridden by setting `force` to true.", CreateContext: resourceKubernetesAnnotationsCreate, ReadContext: resourceKubernetesAnnotationsRead, UpdateContext: resourceKubernetesAnnotationsUpdate, diff --git a/kubernetes/resource_kubernetes_api_service_v1.go b/kubernetes/resource_kubernetes_api_service_v1.go index b186b89fb5..9e1799a3ec 100644 --- a/kubernetes/resource_kubernetes_api_service_v1.go +++ b/kubernetes/resource_kubernetes_api_service_v1.go @@ -19,6 +19,7 @@ import ( func resourceKubernetesAPIServiceV1() *schema.Resource { return &schema.Resource{ + Description: "An API Service is an abstraction which defines for locating and communicating with servers.", CreateContext: resourceKubernetesAPIServiceV1Create, ReadContext: resourceKubernetesAPIServiceV1Read, UpdateContext: resourceKubernetesAPIServiceV1Update, diff --git a/kubernetes/resource_kubernetes_certificate_signing_request.go b/kubernetes/resource_kubernetes_certificate_signing_request.go index 393a4d5df5..e552230530 100644 --- a/kubernetes/resource_kubernetes_certificate_signing_request.go +++ b/kubernetes/resource_kubernetes_certificate_signing_request.go @@ -24,6 +24,7 @@ func resourceKubernetesCertificateSigningRequest() *schema.Resource { apiDocStatus := v1beta1.CertificateSigningRequestStatus{}.SwaggerDoc() return &schema.Resource{ + Description: "Use this resource to generate TLS certificates using Kubernetes. This is a *logical resource*, so it contributes only to the current Terraform state and does not persist any external managed resources. This resource enables automation of [X.509](https://www.itu.int/rec/T-REC-X.509) credential provisioning (including TLS/SSL certificates). It does this by creating a CertificateSigningRequest using the Kubernetes API, which generates a certificate from the Certificate Authority (CA) configured in the Kubernetes cluster. The CSR can be approved automatically by Terraform, or it can be approved by a custom controller running in Kubernetes. See [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) for all available options pertaining to CertificateSigningRequests.", CreateContext: resourceKubernetesCertificateSigningRequestCreate, ReadContext: resourceKubernetesCertificateSigningRequestRead, DeleteContext: resourceKubernetesCertificateSigningRequestDelete, diff --git a/kubernetes/resource_kubernetes_certificate_signing_request_v1.go b/kubernetes/resource_kubernetes_certificate_signing_request_v1.go index 242f279ff7..48e9f4361a 100644 --- a/kubernetes/resource_kubernetes_certificate_signing_request_v1.go +++ b/kubernetes/resource_kubernetes_certificate_signing_request_v1.go @@ -25,6 +25,7 @@ func resourceKubernetesCertificateSigningRequestV1() *schema.Resource { apiDocStatus := certificates.CertificateSigningRequestStatus{}.SwaggerDoc() return &schema.Resource{ + Description: "Use this resource to generate TLS certificates using Kubernetes. This is a *logical resource*, so it contributes only to the current Terraform state and does not persist any external managed resources. This resource enables automation of [X.509](https://www.itu.int/rec/T-REC-X.509) credential provisioning (including TLS/SSL certificates). It does this by creating a CertificateSigningRequest using the Kubernetes API, which generates a certificate from the Certificate Authority (CA) configured in the Kubernetes cluster. The CSR can be approved automatically by Terraform, or it can be approved by a custom controller running in Kubernetes. See [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) for all available options pertaining to CertificateSigningRequests.", CreateContext: resourceKubernetesCertificateSigningRequestV1Create, ReadContext: resourceKubernetesCertificateSigningRequestV1Read, DeleteContext: resourceKubernetesCertificateSigningRequestV1Delete, diff --git a/kubernetes/resource_kubernetes_cluster_role_binding_v1.go b/kubernetes/resource_kubernetes_cluster_role_binding_v1.go index d8ffdcd0ac..2b5575e784 100644 --- a/kubernetes/resource_kubernetes_cluster_role_binding_v1.go +++ b/kubernetes/resource_kubernetes_cluster_role_binding_v1.go @@ -17,6 +17,7 @@ import ( func resourceKubernetesClusterRoleBindingV1() *schema.Resource { return &schema.Resource{ + Description: "A ClusterRoleBinding may be used to grant permission at the cluster level and in all namespaces", CreateContext: resourceKubernetesClusterRoleBindingV1Create, ReadContext: resourceKubernetesClusterRoleBindingV1Read, UpdateContext: resourceKubernetesClusterRoleBindingV1Update, diff --git a/kubernetes/resource_kubernetes_cluster_role_v1.go b/kubernetes/resource_kubernetes_cluster_role_v1.go index 3ea88445c3..59e0bd25a5 100644 --- a/kubernetes/resource_kubernetes_cluster_role_v1.go +++ b/kubernetes/resource_kubernetes_cluster_role_v1.go @@ -17,6 +17,7 @@ import ( func resourceKubernetesClusterRoleV1() *schema.Resource { return &schema.Resource{ + Description: "A ClusterRole creates a role at the cluster level and in all namespaces.", CreateContext: resourceKubernetesClusterRoleV1Create, ReadContext: resourceKubernetesClusterRoleV1Read, UpdateContext: resourceKubernetesClusterRoleV1Update, diff --git a/kubernetes/resource_kubernetes_config_map_v1.go b/kubernetes/resource_kubernetes_config_map_v1.go index 51d798e1c2..1f3a7e5e08 100644 --- a/kubernetes/resource_kubernetes_config_map_v1.go +++ b/kubernetes/resource_kubernetes_config_map_v1.go @@ -19,6 +19,7 @@ import ( func resourceKubernetesConfigMapV1() *schema.Resource { return &schema.Resource{ + Description: "The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes. Config Map can be used to store fine-grained information like individual properties or coarse-grained information like entire config files or JSON blobs.", CreateContext: resourceKubernetesConfigMapV1Create, ReadContext: resourceKubernetesConfigMapV1Read, UpdateContext: resourceKubernetesConfigMapV1Update, diff --git a/kubernetes/resource_kubernetes_config_map_v1_data.go b/kubernetes/resource_kubernetes_config_map_v1_data.go index abc242fe10..7b450ead19 100644 --- a/kubernetes/resource_kubernetes_config_map_v1_data.go +++ b/kubernetes/resource_kubernetes_config_map_v1_data.go @@ -20,6 +20,7 @@ import ( func resourceKubernetesConfigMapV1Data() *schema.Resource { return &schema.Resource{ + Description: "This resource allows Terraform to manage data within a pre-existing ConfigMap. This resource uses [field management](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) to manage only the data that is defined in the Terraform configuration. Existing data not specified in the configuration will be ignored. If data specified in the config and is already managed by another client it will cause a conflict which can be overridden by setting `force` to true.", CreateContext: resourceKubernetesConfigMapV1DataCreate, ReadContext: resourceKubernetesConfigMapV1DataRead, UpdateContext: resourceKubernetesConfigMapV1DataUpdate, diff --git a/kubernetes/resource_kubernetes_cron_job_v1.go b/kubernetes/resource_kubernetes_cron_job_v1.go index 3dda5f05bc..21c282aad5 100644 --- a/kubernetes/resource_kubernetes_cron_job_v1.go +++ b/kubernetes/resource_kubernetes_cron_job_v1.go @@ -21,6 +21,7 @@ import ( func resourceKubernetesCronJobV1() *schema.Resource { return &schema.Resource{ + Description: "A Cron Job creates Jobs on a time-based schedule.One CronJob object is like one line of a crontab (cron table) file. It runs a job periodically on a given schedule, written in Cron format.Note: All CronJob `schedule` times are based on the timezone of the master where the job is initiated. For instructions on creating and working with cron jobs, and for an example of a spec file for a cron job, see [Kubernetes reference](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/).", CreateContext: resourceKubernetesCronJobV1Create, ReadContext: resourceKubernetesCronJobV1Read, UpdateContext: resourceKubernetesCronJobV1Update, diff --git a/kubernetes/resource_kubernetes_csi_driver_v1.go b/kubernetes/resource_kubernetes_csi_driver_v1.go index 4e36f29c91..feb83b922b 100644 --- a/kubernetes/resource_kubernetes_csi_driver_v1.go +++ b/kubernetes/resource_kubernetes_csi_driver_v1.go @@ -23,6 +23,7 @@ import ( func resourceKubernetesCSIDriverV1() *schema.Resource { return &schema.Resource{ + Description: "The [Container Storage Interface](https://kubernetes-csi.github.io/docs/introduction.html) (CSI) is a standard for exposing arbitrary block and file storage systems to containerized workloads on Container Orchestration Systems (COs) like Kubernetes.", CreateContext: resourceKubernetesCSIDriverV1Create, ReadContext: resourceKubernetesCSIDriverV1Read, UpdateContext: resourceKubernetesCSIDriverV1Update, diff --git a/kubernetes/resource_kubernetes_daemon_set_v1.go b/kubernetes/resource_kubernetes_daemon_set_v1.go index 9ddbd43d3f..aaff9183e8 100644 --- a/kubernetes/resource_kubernetes_daemon_set_v1.go +++ b/kubernetes/resource_kubernetes_daemon_set_v1.go @@ -24,6 +24,7 @@ import ( func resourceKubernetesDaemonSetV1() *schema.Resource { return &schema.Resource{ + Description: "A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created.", CreateContext: resourceKubernetesDaemonSetV1Create, ReadContext: resourceKubernetesDaemonSetV1Read, UpdateContext: resourceKubernetesDaemonSetV1Update, diff --git a/kubernetes/resource_kubernetes_deployment_v1.go b/kubernetes/resource_kubernetes_deployment_v1.go index e6730cd2ba..a28338ff22 100644 --- a/kubernetes/resource_kubernetes_deployment_v1.go +++ b/kubernetes/resource_kubernetes_deployment_v1.go @@ -29,6 +29,7 @@ const ( func resourceKubernetesDeploymentV1() *schema.Resource { return &schema.Resource{ + Description: "A Deployment ensures that a specified number of pod “replicas” are running at any one time. In other words, a Deployment makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Deployment will start more.", CreateContext: resourceKubernetesDeploymentV1Create, ReadContext: resourceKubernetesDeploymentV1Read, UpdateContext: resourceKubernetesDeploymentV1Update, diff --git a/kubernetes/resource_kubernetes_endpoints_v1.go b/kubernetes/resource_kubernetes_endpoints_v1.go index fa3c1d00f9..2654b0bb41 100644 --- a/kubernetes/resource_kubernetes_endpoints_v1.go +++ b/kubernetes/resource_kubernetes_endpoints_v1.go @@ -18,6 +18,7 @@ import ( func resourceKubernetesEndpointsV1() *schema.Resource { return &schema.Resource{ + Description: "An Endpoints resource is an abstraction, linked to a Service, which defines the list of endpoints that actually implement the service.", CreateContext: resourceKubernetesEndpointsV1Create, ReadContext: resourceKubernetesEndpointsV1Read, UpdateContext: resourceKubernetesEndpointsV1Update, diff --git a/kubernetes/resource_kubernetes_endpointslice_v1.go b/kubernetes/resource_kubernetes_endpointslice_v1.go index eae31ba04a..5da75d0857 100644 --- a/kubernetes/resource_kubernetes_endpointslice_v1.go +++ b/kubernetes/resource_kubernetes_endpointslice_v1.go @@ -19,6 +19,7 @@ import ( func resourceKubernetesEndpointSliceV1() *schema.Resource { return &schema.Resource{ + Description: "An EndpointSlice contains references to a set of network endpoints.", CreateContext: resourceKubernetesEndpointSliceV1Create, ReadContext: resourceKubernetesEndpointSliceV1Read, UpdateContext: resourceKubernetesEndpointSliceV1Update, diff --git a/kubernetes/resource_kubernetes_env.go b/kubernetes/resource_kubernetes_env.go index 36151ffa04..275b9a2c30 100644 --- a/kubernetes/resource_kubernetes_env.go +++ b/kubernetes/resource_kubernetes_env.go @@ -27,6 +27,7 @@ import ( func resourceKubernetesEnv() *schema.Resource { return &schema.Resource{ + Description: "This resource provides a way to manage environment variables in resources that were created outside of Terraform. This resource provides functionality similar to the `kubectl set env` command.", CreateContext: resourceKubernetesEnvCreate, ReadContext: resourceKubernetesEnvRead, UpdateContext: resourceKubernetesEnvUpdate, diff --git a/kubernetes/resource_kubernetes_horizontal_pod_autoscaler.go b/kubernetes/resource_kubernetes_horizontal_pod_autoscaler.go index 1894c94c40..ab057880d2 100644 --- a/kubernetes/resource_kubernetes_horizontal_pod_autoscaler.go +++ b/kubernetes/resource_kubernetes_horizontal_pod_autoscaler.go @@ -18,6 +18,7 @@ import ( func resourceKubernetesHorizontalPodAutoscaler() *schema.Resource { return &schema.Resource{ + Description: "Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization.", CreateContext: resourceKubernetesHorizontalPodAutoscalerCreate, ReadContext: resourceKubernetesHorizontalPodAutoscalerRead, UpdateContext: resourceKubernetesHorizontalPodAutoscalerUpdate, diff --git a/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v1.go b/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v1.go index 175db33345..2875f890a3 100644 --- a/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v1.go +++ b/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v1.go @@ -18,6 +18,7 @@ import ( func resourceKubernetesHorizontalPodAutoscalerV1() *schema.Resource { return &schema.Resource{ + Description: "Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization.", CreateContext: resourceKubernetesHorizontalPodAutoscalerV1Create, ReadContext: resourceKubernetesHorizontalPodAutoscalerV1Read, UpdateContext: resourceKubernetesHorizontalPodAutoscalerV1Update, diff --git a/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v2.go b/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v2.go index c4938418f5..9e96661766 100644 --- a/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v2.go +++ b/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v2.go @@ -19,6 +19,7 @@ import ( func resourceKubernetesHorizontalPodAutoscalerV2() *schema.Resource { return &schema.Resource{ + Description: "Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization.", CreateContext: resourceKubernetesHorizontalPodAutoscalerV2Create, ReadContext: resourceKubernetesHorizontalPodAutoscalerV2Read, UpdateContext: resourceKubernetesHorizontalPodAutoscalerV2Update, diff --git a/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v2beta2.go b/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v2beta2.go index 02785d741a..a614c36800 100644 --- a/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v2beta2.go +++ b/kubernetes/resource_kubernetes_horizontal_pod_autoscaler_v2beta2.go @@ -19,6 +19,7 @@ import ( func resourceKubernetesHorizontalPodAutoscalerV2Beta2() *schema.Resource { return &schema.Resource{ + Description: "Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization.", CreateContext: resourceKubernetesHorizontalPodAutoscalerV2Beta2Create, ReadContext: resourceKubernetesHorizontalPodAutoscalerV2Beta2Read, UpdateContext: resourceKubernetesHorizontalPodAutoscalerV2Beta2Update, diff --git a/kubernetes/resource_kubernetes_ingress_class_v1.go b/kubernetes/resource_kubernetes_ingress_class_v1.go index 30af3a8ac5..b556701af6 100644 --- a/kubernetes/resource_kubernetes_ingress_class_v1.go +++ b/kubernetes/resource_kubernetes_ingress_class_v1.go @@ -20,6 +20,7 @@ import ( func resourceKubernetesIngressClassV1() *schema.Resource { return &schema.Resource{ + Description: "Ingresses can be implemented by different controllers, often with different configuration. Each Ingress should specify a class, a reference to an IngressClass resource that contains additional configuration including the name of the controller that should implement the class.", CreateContext: resourceKubernetesIngressClassV1Create, ReadContext: resourceKubernetesIngressClassV1Read, UpdateContext: resourceKubernetesIngressClassV1Update, diff --git a/kubernetes/resource_kubernetes_ingress_v1.go b/kubernetes/resource_kubernetes_ingress_v1.go index 87121db4ba..5ff6e1f599 100644 --- a/kubernetes/resource_kubernetes_ingress_v1.go +++ b/kubernetes/resource_kubernetes_ingress_v1.go @@ -21,6 +21,7 @@ import ( func resourceKubernetesIngressV1() *schema.Resource { return &schema.Resource{ + Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", CreateContext: resourceKubernetesIngressV1Create, ReadContext: resourceKubernetesIngressV1Read, UpdateContext: resourceKubernetesIngressV1Update, diff --git a/kubernetes/resource_kubernetes_job_v1.go b/kubernetes/resource_kubernetes_job_v1.go index 16d88bf260..572635b340 100644 --- a/kubernetes/resource_kubernetes_job_v1.go +++ b/kubernetes/resource_kubernetes_job_v1.go @@ -23,6 +23,7 @@ import ( func resourceKubernetesJobV1() *schema.Resource { return &schema.Resource{ + Description: "A Job creates one or more Pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot. You can also use a Job to run multiple Pods in parallel. ", CreateContext: resourceKubernetesJobV1Create, ReadContext: resourceKubernetesJobV1Read, UpdateContext: resourceKubernetesJobV1Update, diff --git a/kubernetes/resource_kubernetes_labels.go b/kubernetes/resource_kubernetes_labels.go index f7c494451b..4933f01411 100644 --- a/kubernetes/resource_kubernetes_labels.go +++ b/kubernetes/resource_kubernetes_labels.go @@ -26,6 +26,7 @@ import ( func resourceKubernetesLabels() *schema.Resource { return &schema.Resource{ + Description: "This resource allows Terraform to manage the labels for a resource that already exists. This resource uses [field management](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) to manage only the labels that are defined in the Terraform configuration. Existing labels not specified in the configuration will be ignored. If a label specified in the config and is already managed by another client it will cause a conflict which can be overridden by setting `force` to true.", CreateContext: resourceKubernetesLabelsCreate, ReadContext: resourceKubernetesLabelsRead, UpdateContext: resourceKubernetesLabelsUpdate, diff --git a/kubernetes/resource_kubernetes_limit_range_v1.go b/kubernetes/resource_kubernetes_limit_range_v1.go index 0ec335f8da..1362ddcff3 100644 --- a/kubernetes/resource_kubernetes_limit_range_v1.go +++ b/kubernetes/resource_kubernetes_limit_range_v1.go @@ -18,6 +18,7 @@ import ( func resourceKubernetesLimitRangeV1() *schema.Resource { return &schema.Resource{ + Description: "Limit Range sets resource usage limits (e.g. memory, cpu, storage) for supported kinds of resources in a namespace. Read more in [the official docs](https://kubernetes.io/docs/concepts/policy/limit-range/).", CreateContext: resourceKubernetesLimitRangeV1Create, ReadContext: resourceKubernetesLimitRangeV1Read, UpdateContext: resourceKubernetesLimitRangeV1Update, diff --git a/kubernetes/resource_kubernetes_mutating_webhook_configuration.go b/kubernetes/resource_kubernetes_mutating_webhook_configuration.go index b02f4bdda1..af4f3f470a 100644 --- a/kubernetes/resource_kubernetes_mutating_webhook_configuration.go +++ b/kubernetes/resource_kubernetes_mutating_webhook_configuration.go @@ -24,6 +24,7 @@ func resourceKubernetesMutatingWebhookConfiguration() *schema.Resource { apiDoc := admissionregistrationv1.MutatingWebhookConfiguration{}.SwaggerDoc() webhookDoc := admissionregistrationv1.MutatingWebhook{}.SwaggerDoc() return &schema.Resource{ + Description: "Mutating Webhook Configuration configures a [mutating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks).", CreateContext: resourceKubernetesMutatingWebhookConfigurationCreate, ReadContext: resourceKubernetesMutatingWebhookConfigurationRead, UpdateContext: resourceKubernetesMutatingWebhookConfigurationUpdate, diff --git a/kubernetes/resource_kubernetes_mutating_webhook_configuration_v1.go b/kubernetes/resource_kubernetes_mutating_webhook_configuration_v1.go index 0cf65c0417..edf29308d5 100644 --- a/kubernetes/resource_kubernetes_mutating_webhook_configuration_v1.go +++ b/kubernetes/resource_kubernetes_mutating_webhook_configuration_v1.go @@ -22,6 +22,7 @@ func resourceKubernetesMutatingWebhookConfigurationV1() *schema.Resource { apiDoc := admissionregistrationv1.MutatingWebhookConfiguration{}.SwaggerDoc() webhookDoc := admissionregistrationv1.MutatingWebhook{}.SwaggerDoc() return &schema.Resource{ + Description: "Mutating Webhook Configuration configures a [mutating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks).", CreateContext: resourceKubernetesMutatingWebhookConfigurationV1Create, ReadContext: resourceKubernetesMutatingWebhookConfigurationV1Read, UpdateContext: resourceKubernetesMutatingWebhookConfigurationV1Update, diff --git a/kubernetes/resource_kubernetes_namespace_v1.go b/kubernetes/resource_kubernetes_namespace_v1.go index 382ac149d6..eec651d196 100644 --- a/kubernetes/resource_kubernetes_namespace_v1.go +++ b/kubernetes/resource_kubernetes_namespace_v1.go @@ -21,6 +21,7 @@ import ( func resourceKubernetesNamespaceV1() *schema.Resource { return &schema.Resource{ + Description: "Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces. Read more about namespaces at [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/)", CreateContext: resourceKubernetesNamespaceV1Create, ReadContext: resourceKubernetesNamespaceV1Read, UpdateContext: resourceKubernetesNamespaceV1Update, diff --git a/kubernetes/resource_kubernetes_network_policy_v1.go b/kubernetes/resource_kubernetes_network_policy_v1.go index 9596f80200..caa62d58ac 100644 --- a/kubernetes/resource_kubernetes_network_policy_v1.go +++ b/kubernetes/resource_kubernetes_network_policy_v1.go @@ -37,6 +37,7 @@ var ( func resourceKubernetesNetworkPolicyV1() *schema.Resource { return &schema.Resource{ + Description: "Kubernetes supports network policies to specify how groups of pods are allowed to communicate with each other and with other network endpoints. NetworkPolicy resources use labels to select pods and define rules which specify what traffic is allowed to the selected pods. Read more about network policies at https://kubernetes.io/docs/concepts/services-networking/network-policies/", CreateContext: resourceKubernetesNetworkPolicyV1Create, ReadContext: resourceKubernetesNetworkPolicyV1Read, UpdateContext: resourceKubernetesNetworkPolicyV1Update, diff --git a/kubernetes/resource_kubernetes_node_taint.go b/kubernetes/resource_kubernetes_node_taint.go index aec0c89fcf..06bc6d18c6 100644 --- a/kubernetes/resource_kubernetes_node_taint.go +++ b/kubernetes/resource_kubernetes_node_taint.go @@ -19,6 +19,7 @@ import ( func resourceKubernetesNodeTaint() *schema.Resource { return &schema.Resource{ + Description: "[Node affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) is a property of Pods that attracts them to a set of [nodes](https://kubernetes.io/docs/concepts/architecture/nodes/) (either as a preference or a hard requirement). Taints are the opposite -- they allow a node to repel a set of pods.", CreateContext: resourceKubernetesNodeTaintCreate, ReadContext: resourceKubernetesNodeTaintRead, UpdateContext: resourceKubernetesNodeTaintUpdate, diff --git a/kubernetes/resource_kubernetes_persistent_volume_claim_v1.go b/kubernetes/resource_kubernetes_persistent_volume_claim_v1.go index 0f87240604..fa5137e220 100644 --- a/kubernetes/resource_kubernetes_persistent_volume_claim_v1.go +++ b/kubernetes/resource_kubernetes_persistent_volume_claim_v1.go @@ -31,6 +31,7 @@ func resourceKubernetesPersistentVolumeClaimV1() *schema.Resource { Default: true, } return &schema.Resource{ + Description: "This resource allows the user to request for and claim to a persistent volume.", CreateContext: resourceKubernetesPersistentVolumeClaimV1Create, ReadContext: resourceKubernetesPersistentVolumeClaimV1Read, UpdateContext: resourceKubernetesPersistentVolumeClaimV1Update, diff --git a/kubernetes/resource_kubernetes_persistent_volume_v1.go b/kubernetes/resource_kubernetes_persistent_volume_v1.go index 857717ad24..241d96e4f8 100644 --- a/kubernetes/resource_kubernetes_persistent_volume_v1.go +++ b/kubernetes/resource_kubernetes_persistent_volume_v1.go @@ -29,6 +29,7 @@ const ( func resourceKubernetesPersistentVolumeV1() *schema.Resource { return &schema.Resource{ + Description: "The resource provides a piece of networked storage in the cluster provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. Persistent Volumes have a lifecycle independent of any individual pod that uses the PV. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)", CreateContext: resourceKubernetesPersistentVolumeV1Create, ReadContext: resourceKubernetesPersistentVolumeV1Read, UpdateContext: resourceKubernetesPersistentVolumeV1Update, diff --git a/kubernetes/resource_kubernetes_pod_disruption_budget.go b/kubernetes/resource_kubernetes_pod_disruption_budget.go index 402ae02284..bc9ae4ce21 100644 --- a/kubernetes/resource_kubernetes_pod_disruption_budget.go +++ b/kubernetes/resource_kubernetes_pod_disruption_budget.go @@ -26,6 +26,7 @@ var ( func resourceKubernetesPodDisruptionBudget() *schema.Resource { return &schema.Resource{ + Description: "A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total.", CreateContext: resourceKubernetesPodDisruptionBudgetCreate, ReadContext: resourceKubernetesPodDisruptionBudgetRead, UpdateContext: resourceKubernetesPodDisruptionBudgetUpdate, diff --git a/kubernetes/resource_kubernetes_pod_disruption_budget_v1.go b/kubernetes/resource_kubernetes_pod_disruption_budget_v1.go index d62c0c2efc..c3e004c2ae 100644 --- a/kubernetes/resource_kubernetes_pod_disruption_budget_v1.go +++ b/kubernetes/resource_kubernetes_pod_disruption_budget_v1.go @@ -26,6 +26,7 @@ var ( func resourceKubernetesPodDisruptionBudgetV1() *schema.Resource { return &schema.Resource{ + Description: "A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total.", CreateContext: resourceKubernetesPodDisruptionBudgetV1Create, ReadContext: resourceKubernetesPodDisruptionBudgetV1Read, UpdateContext: resourceKubernetesPodDisruptionBudgetV1Update, diff --git a/kubernetes/resource_kubernetes_pod_security_policy_v1beta1.go b/kubernetes/resource_kubernetes_pod_security_policy_v1beta1.go index f1552ceb62..da8b3696b7 100644 --- a/kubernetes/resource_kubernetes_pod_security_policy_v1beta1.go +++ b/kubernetes/resource_kubernetes_pod_security_policy_v1beta1.go @@ -67,6 +67,7 @@ var ( func resourceKubernetesPodSecurityPolicyV1Beta1() *schema.Resource { return &schema.Resource{ DeprecationMessage: `"PodSecurityPolicy" was deprecated in Kubernetes v1.21.0; Starting from version 1.21.0 Kubernetes has deprecated PodSecurityPolicy and has been removed entirely in v1.25.0`, + Description: "A Pod Security Policy is a cluster-level resource that controls security sensitive aspects of the pod specification. The PodSecurityPolicy objects define a set of conditions that a pod must run with in order to be accepted into the system, as well as defaults for the related fields.", CreateContext: resourceKubernetesPodSecurityPolicyV1Beta1Create, ReadContext: resourceKubernetesPodSecurityPolicyV1Beta1Read, UpdateContext: resourceKubernetesPodSecurityPolicyV1Beta1Update, diff --git a/kubernetes/resource_kubernetes_pod_v1.go b/kubernetes/resource_kubernetes_pod_v1.go index aa91c9af69..bc76604102 100644 --- a/kubernetes/resource_kubernetes_pod_v1.go +++ b/kubernetes/resource_kubernetes_pod_v1.go @@ -22,6 +22,7 @@ import ( func resourceKubernetesPodV1() *schema.Resource { return &schema.Resource{ + Description: "A pod is a group of one or more containers, the shared storage for those containers, and options about how to run the containers. Pods are always co-located and co-scheduled, and run in a shared context. Read more at [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod/)", CreateContext: resourceKubernetesPodV1Create, ReadContext: resourceKubernetesPodV1Read, UpdateContext: resourceKubernetesPodV1Update, diff --git a/kubernetes/resource_kubernetes_priority_class_v1.go b/kubernetes/resource_kubernetes_priority_class_v1.go index f4c29620b5..0586e10e60 100644 --- a/kubernetes/resource_kubernetes_priority_class_v1.go +++ b/kubernetes/resource_kubernetes_priority_class_v1.go @@ -20,6 +20,7 @@ import ( func resourceKubernetesPriorityClassV1() *schema.Resource { return &schema.Resource{ + Description: "A PriorityClass is a non-namespaced object that defines a mapping from a priority class name to the integer value of the priority.", CreateContext: resourceKubernetesPriorityClassV1Create, ReadContext: resourceKubernetesPriorityClassV1Read, UpdateContext: resourceKubernetesPriorityClassV1Update, diff --git a/kubernetes/resource_kubernetes_replication_controller_v1.go b/kubernetes/resource_kubernetes_replication_controller_v1.go index 83027fdd35..ce19e10265 100644 --- a/kubernetes/resource_kubernetes_replication_controller_v1.go +++ b/kubernetes/resource_kubernetes_replication_controller_v1.go @@ -22,6 +22,7 @@ import ( func resourceKubernetesReplicationControllerV1() *schema.Resource { return &schema.Resource{ + Description: "A Replication Controller ensures that a specified number of pod “replicas” are running at any one time. In other words, a Replication Controller makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Replication Controller will start more.", CreateContext: resourceKubernetesReplicationControllerV1Create, ReadContext: resourceKubernetesReplicationControllerV1Read, UpdateContext: resourceKubernetesReplicationControllerV1Update, diff --git a/kubernetes/resource_kubernetes_resource_quota_v1.go b/kubernetes/resource_kubernetes_resource_quota_v1.go index d19a7b04a3..25e69b0c5d 100644 --- a/kubernetes/resource_kubernetes_resource_quota_v1.go +++ b/kubernetes/resource_kubernetes_resource_quota_v1.go @@ -22,6 +22,7 @@ import ( func resourceKubernetesResourceQuotaV1() *schema.Resource { return &schema.Resource{ + Description: "A resource quota provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that project.", CreateContext: resourceKubernetesResourceQuotaV1Create, ReadContext: resourceKubernetesResourceQuotaV1Read, UpdateContext: resourceKubernetesResourceQuotaV1Update, diff --git a/kubernetes/resource_kubernetes_role_binding_v1.go b/kubernetes/resource_kubernetes_role_binding_v1.go index 2e0770187e..a90f9204a0 100644 --- a/kubernetes/resource_kubernetes_role_binding_v1.go +++ b/kubernetes/resource_kubernetes_role_binding_v1.go @@ -17,6 +17,7 @@ import ( func resourceKubernetesRoleBindingV1() *schema.Resource { return &schema.Resource{ + Description: "A RoleBinding may be used to grant permission at the namespace level", CreateContext: resourceKubernetesRoleBindingV1Create, ReadContext: resourceKubernetesRoleBindingV1Read, UpdateContext: resourceKubernetesRoleBindingV1Update, diff --git a/kubernetes/resource_kubernetes_role_v1.go b/kubernetes/resource_kubernetes_role_v1.go index 4d335281d3..2d67f37878 100644 --- a/kubernetes/resource_kubernetes_role_v1.go +++ b/kubernetes/resource_kubernetes_role_v1.go @@ -18,6 +18,7 @@ import ( func resourceKubernetesRoleV1() *schema.Resource { return &schema.Resource{ + Description: "A role contains rules that represent a set of permissions. Permissions are purely additive (there are no “deny” rules).", CreateContext: resourceKubernetesRoleV1Create, ReadContext: resourceKubernetesRoleV1Read, UpdateContext: resourceKubernetesRoleV1Update, diff --git a/kubernetes/resource_kubernetes_runtime_class_v1.go b/kubernetes/resource_kubernetes_runtime_class_v1.go index ebd05aa37f..295356f6c6 100644 --- a/kubernetes/resource_kubernetes_runtime_class_v1.go +++ b/kubernetes/resource_kubernetes_runtime_class_v1.go @@ -21,6 +21,7 @@ import ( func resourceKubernetesRuntimeClassV1() *schema.Resource { return &schema.Resource{ + Description: "A runtime class is used to determine which container runtime is used to run all containers in a pod.", CreateContext: resourceKubernetesRuntimeClassV1Create, ReadContext: resourceKubernetesRuntimeClassV1Read, UpdateContext: resourceKubernetesRuntimeClassV1Update, diff --git a/kubernetes/resource_kubernetes_secret_v1.go b/kubernetes/resource_kubernetes_secret_v1.go index b533e81ddf..df9c8a90c9 100644 --- a/kubernetes/resource_kubernetes_secret_v1.go +++ b/kubernetes/resource_kubernetes_secret_v1.go @@ -22,6 +22,7 @@ import ( func resourceKubernetesSecretV1() *schema.Resource { return &schema.Resource{ + Description: "The resource provides mechanisms to inject containers with sensitive information, such as passwords, while keeping containers agnostic of Kubernetes. Secrets can be used to store sensitive information either as individual properties or coarse-grained entries like entire files or JSON blobs. The resource will by default create a secret which is available to any pod in the specified (or default) namespace.", CreateContext: resourceKubernetesSecretV1Create, ReadContext: resourceKubernetesSecretV1Read, UpdateContext: resourceKubernetesSecretV1Update, diff --git a/kubernetes/resource_kubernetes_service_account_v1.go b/kubernetes/resource_kubernetes_service_account_v1.go index f4bb756254..832b7736b6 100644 --- a/kubernetes/resource_kubernetes_service_account_v1.go +++ b/kubernetes/resource_kubernetes_service_account_v1.go @@ -24,6 +24,7 @@ import ( func resourceKubernetesServiceAccountV1() *schema.Resource { return &schema.Resource{ + Description: "A service account provides an identity for processes that run in a Pod. Read more at [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/)", CreateContext: resourceKubernetesServiceAccountV1Create, ReadContext: resourceKubernetesServiceAccountV1Read, UpdateContext: resourceKubernetesServiceAccountV1Update, diff --git a/kubernetes/resource_kubernetes_service_v1.go b/kubernetes/resource_kubernetes_service_v1.go index 6aa84c67af..934f038082 100644 --- a/kubernetes/resource_kubernetes_service_v1.go +++ b/kubernetes/resource_kubernetes_service_v1.go @@ -22,6 +22,7 @@ import ( func resourceKubernetesServiceV1() *schema.Resource { return &schema.Resource{ + Description: "A Service is an abstraction which defines a logical set of pods and a policy by which to access them - sometimes called a micro-service.", CreateContext: resourceKubernetesServiceV1Create, ReadContext: resourceKubernetesServiceV1Read, UpdateContext: resourceKubernetesServiceV1Update, diff --git a/kubernetes/resource_kubernetes_stateful_set_v1.go b/kubernetes/resource_kubernetes_stateful_set_v1.go index 52c10f766d..491dd3ff89 100644 --- a/kubernetes/resource_kubernetes_stateful_set_v1.go +++ b/kubernetes/resource_kubernetes_stateful_set_v1.go @@ -25,6 +25,7 @@ import ( func resourceKubernetesStatefulSetV1() *schema.Resource { return &schema.Resource{ + Description: "Manages the deployment and scaling of a set of Pods , and provides guarantees about the ordering and uniqueness of these Pods. Like a Deployment , a StatefulSet manages Pods that are based on an identical container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. These pods are created from the same spec, but are not interchangeable: each has a persistent identifier that it maintains across any rescheduling. A StatefulSet operates under the same pattern as any other Controller. You define your desired state in a StatefulSet object, and the StatefulSet controller makes any necessary updates to get there from the current state.", CreateContext: resourceKubernetesStatefulSetV1Create, ReadContext: resourceKubernetesStatefulSetV1Read, UpdateContext: resourceKubernetesStatefulSetV1Update, diff --git a/kubernetes/resource_kubernetes_storage_class_v1.go b/kubernetes/resource_kubernetes_storage_class_v1.go index af5c97f634..60ddb55cc2 100644 --- a/kubernetes/resource_kubernetes_storage_class_v1.go +++ b/kubernetes/resource_kubernetes_storage_class_v1.go @@ -22,6 +22,7 @@ import ( func resourceKubernetesStorageClassV1() *schema.Resource { return &schema.Resource{ + Description: "Storage class is the foundation of dynamic provisioning, allowing cluster administrators to define abstractions for the underlying storage platform. Read more [here] (https://kubernetes.io/blog/2017/03/dynamic-provisioning-and-storage-classes-kubernetes/)", CreateContext: resourceKubernetesStorageClassV1Create, ReadContext: resourceKubernetesStorageClassV1Read, UpdateContext: resourceKubernetesStorageClassV1Update, diff --git a/kubernetes/resource_kubernetes_tokenrequest_v1.go b/kubernetes/resource_kubernetes_tokenrequest_v1.go index 7b1c730e06..fe5dd6b5f4 100644 --- a/kubernetes/resource_kubernetes_tokenrequest_v1.go +++ b/kubernetes/resource_kubernetes_tokenrequest_v1.go @@ -15,6 +15,7 @@ import ( func resourceKubernetesTokenRequestV1() *schema.Resource { return &schema.Resource{ + Description: "TokenRequest requests a token for a given service account.", CreateContext: resourceKubernetesTokenRequestV1Create, ReadContext: resourceKubernetesTokenRequestV1Read, UpdateContext: resourceKubernetesTokenRequestV1Update, diff --git a/kubernetes/resource_kubernetes_validating_webhook_configuration_v1.go b/kubernetes/resource_kubernetes_validating_webhook_configuration_v1.go index e9fd6dcd35..be327a4cba 100644 --- a/kubernetes/resource_kubernetes_validating_webhook_configuration_v1.go +++ b/kubernetes/resource_kubernetes_validating_webhook_configuration_v1.go @@ -24,6 +24,7 @@ func resourceKubernetesValidatingWebhookConfigurationV1() *schema.Resource { apiDoc := admissionregistrationv1.ValidatingWebhookConfiguration{}.SwaggerDoc() webhookDoc := admissionregistrationv1.ValidatingWebhook{}.SwaggerDoc() return &schema.Resource{ + Description: "Validating Webhook Configuration configures a [validating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks).", CreateContext: resourceKubernetesValidatingWebhookConfigurationV1Create, ReadContext: resourceKubernetesValidatingWebhookConfigurationV1Read, UpdateContext: resourceKubernetesValidatingWebhookConfigurationV1Update, diff --git a/templates/resources/annotations.md.tmpl b/templates/resources/annotations.md.tmpl index 83e5f126d7..3564c36830 100644 --- a/templates/resources/annotations.md.tmpl +++ b/templates/resources/annotations.md.tmpl @@ -5,13 +5,11 @@ description: |- This resource allows Terraform to manage the annotations for a resource that already exists --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_annotations - -This resource allows Terraform to manage the annotations for a resource that already exists. This resource uses [field management](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) to manage only the annotations that are defined in the Terraform configuration. Existing annotations not specified in the configuration will be ignored. If an annotation specified in the config and is already managed by another client it will cause a conflict which can be overridden by setting `force` to true. +{{ .SchemaMarkdown }} ## Example Usage @@ -21,29 +19,6 @@ This resource allows Terraform to manage the annotations for a resource that alr {{tffile "examples/resources/annotations/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -~> NOTE: At least one of `annotations` or `template_annotations` is required. - -* `api_version` - (Required) The apiVersion of the resource to be annotated. -* `kind` - (Required) The kind of the resource to be annotated. -* `metadata` - (Required) Standard metadata of the resource to be annotated. -* `annotations` - (Optional) A map of annotations to apply to the resource. -* `template_annotations` - (Optional) A map of annotations to apply to the pod template within the resource. -* `force` - (Optional) Force management of annotations if there is a conflict. Defaults to `false`. -* `field_manager` - (Optional) The name of the [field manager](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management). Defaults to `Terraform`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `name` - (Required) Name of the resource to be annotated. -* `namespace` - (Optional) Namespace of the resource to be annotated. - ## Import This resource does not support the `import` command. As this resource operates on Kubernetes resources that already exist, creating the resource is equivalent to importing it. diff --git a/templates/resources/api_service.md.tmpl b/templates/resources/api_service.md.tmpl index 74628a496a..a626522385 100644 --- a/templates/resources/api_service.md.tmpl +++ b/templates/resources/api_service.md.tmpl @@ -5,68 +5,16 @@ description: |- An API Service is an abstraction which defines for locating and communicating with servers. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_api_service - -An API Service is an abstraction which defines for locating and communicating with servers. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/api_service/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard API service's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec contains information for locating and communicating with a server. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the API service that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the API service. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the API service, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this API service that can be used by clients to determine when API service has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this API service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `ca_bundle` - (Optional) CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used. -* `group` - (Required) Group is the API group name this server hosts. -* `group_priority_minimum` - (Required) GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s. -* `insecure_skip_tls_verify` - (Required) InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. -* `service` - (Optional) Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. See `service` block attributes below. -* `version` - (Required) Version is the API version this server hosts. For example, `v1`. -* `version_priority` - (Required) VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is `kube-like`, it will sort above non `kube-like` version strings, which are ordered lexicographically. `Kube-like` versions start with a `v`, then are followed by a number (the major version), then optionally the string `alpha` or `beta` and another number (the minor version). These are sorted first by GA > `beta` > `alpha` (where GA is a version with no suffix such as `beta` or `alpha`), and then by comparing major version, then minor version. An example sorted list of versions: `v10`, `v2`, `v1`, `v11beta2`, `v10beta3`, `v3beta1`, `v12alpha1`, `v11alpha2`, `foo1`, `foo10`.. - -### `service` - -#### Arguments - -* `name` - (Required) Name is the name of the service. -* `namespace` - (Required) Namespace is the namespace of the service. -* `port` - (Optional) If specified, the port on the service that is hosting the service. Defaults to 443 for backward compatibility. Should be a valid port number (1-65535, inclusive). - ## Import API service can be imported using its name, e.g. diff --git a/templates/resources/api_service_v1.md.tmpl b/templates/resources/api_service_v1.md.tmpl index f1d1c4dc45..e1455cf52c 100644 --- a/templates/resources/api_service_v1.md.tmpl +++ b/templates/resources/api_service_v1.md.tmpl @@ -5,68 +5,16 @@ description: |- An API Service is an abstraction which defines for locating and communicating with servers. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_api_service_v1 - -An API Service is an abstraction which defines for locating and communicating with servers. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/api_service_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard API service's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec contains information for locating and communicating with a server. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the API service that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the API service. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the API service, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this API service that can be used by clients to determine when API service has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this API service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `ca_bundle` - (Optional) CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used. -* `group` - (Required) Group is the API group name this server hosts. -* `group_priority_minimum` - (Required) GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s. -* `insecure_skip_tls_verify` - (Required) InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. -* `service` - (Optional) Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. See `service` block attributes below. -* `version` - (Required) Version is the API version this server hosts. For example, `v1`. -* `version_priority` - (Required) VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is `kube-like`, it will sort above non `kube-like` version strings, which are ordered lexicographically. `Kube-like` versions start with a `v`, then are followed by a number (the major version), then optionally the string `alpha` or `beta` and another number (the minor version). These are sorted first by GA > `beta` > `alpha` (where GA is a version with no suffix such as `beta` or `alpha`), and then by comparing major version, then minor version. An example sorted list of versions: `v10`, `v2`, `v1`, `v11beta2`, `v10beta3`, `v3beta1`, `v12alpha1`, `v11alpha2`, `foo1`, `foo10`.. - -### `service` - -#### Arguments - -* `name` - (Required) Name is the name of the service. -* `namespace` - (Required) Namespace is the namespace of the service. -* `port` - (Optional) If specified, the port on the service that is hosting the service. Defaults to 443 for backward compatibility. Should be a valid port number (1-65535, inclusive). - ## Import API service can be imported using its name, e.g. diff --git a/templates/resources/certificate_signing_request.md.tmpl b/templates/resources/certificate_signing_request.md.tmpl index 11c4f8cebf..502577ce02 100644 --- a/templates/resources/certificate_signing_request.md.tmpl +++ b/templates/resources/certificate_signing_request.md.tmpl @@ -5,62 +5,16 @@ description: |- Use this resource to generate TLS certificates using Kubernetes. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_certificate_signing_request - -Use this resource to generate TLS certificates using Kubernetes. - -This is a *logical resource*, so it contributes only to the current Terraform state and does not persist any external managed resources. - -This resource enables automation of [X.509](https://www.itu.int/rec/T-REC-X.509) credential provisioning (including TLS/SSL certificates). It does this by creating a CertificateSigningRequest using the Kubernetes API, which generates a certificate from the Certificate Authority (CA) configured in the Kubernetes cluster. The CSR can be approved automatically by Terraform, or it can be approved by a custom controller running in Kubernetes. See [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) for all available options pertaining to CertificateSigningRequests. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/certificate_signing_request/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `auto_approve` - (Optional) Automatically approve the CertificateSigningRequest. Defaults to 'true'. -* `metadata` - (Required) Standard certificate signing request's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the deployment. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the certificate signing request that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the certificate signing request. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the certificate signing request, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `certificate` - The signed certificate PEM data. -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this certificate signing request that can be used by clients to determine when certificate signing request has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this certificate signing request. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `request` - (Required) Base64-encoded PKCS#10 CSR data. -* `signer_name` - (Optional) Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`. If empty, it will be defaulted: 1. If it's a kubelet client certificate, it is assigned "kubernetes.io/kube-apiserver-client-kubelet". 2. If it's a kubelet serving certificate, it is assigned "kubernetes.io/kubelet-serving". 3. Otherwise, it is assigned "kubernetes.io/legacy-unknown". Distribution of trust for signers happens out of band. -* `usages` - (Required) Specifies a set of usage contexts the key will be valid for. See https://godoc.org/k8s.io/api/certificates/v1beta1#KeyUsage - ## Generating a New Certificate Since the certificate is a logical resource that lives only in the Terraform state, it will persist until it is explicitly destroyed by the user. diff --git a/templates/resources/certificate_signing_request_v1.md.tmpl b/templates/resources/certificate_signing_request_v1.md.tmpl index 046d2dd737..e5f3f6dba9 100644 --- a/templates/resources/certificate_signing_request_v1.md.tmpl +++ b/templates/resources/certificate_signing_request_v1.md.tmpl @@ -9,58 +9,16 @@ description: |- For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} -# kubernetes_certificate_signing_request_v1 +# {{ .Name }} -Use this resource to generate TLS certificates using Kubernetes. +{{ .Description }} -This is a *logical resource*, so it contributes only to the current Terraform state and does not persist any external managed resources. - -This resource enables automation of [X.509](https://www.itu.int/rec/T-REC-X.509) credential provisioning (including TLS/SSL certificates). It does this by creating a CertificateSigningRequest using the Kubernetes API, which generates a certificate from the Certificate Authority (CA) configured in the Kubernetes cluster. The CSR can be approved automatically by Terraform, or it can be approved by a custom controller running in Kubernetes. See [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) for all available options pertaining to CertificateSigningRequests. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/certificate_signing_request_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `auto_approve` - (Optional) Automatically approve the CertificateSigningRequest. Defaults to 'true'. -* `metadata` - (Required) Standard certificate signing request's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the deployment. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the certificate signing request that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the certificate signing request. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the certificate signing request, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `certificate` - The signed certificate PEM data. -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this certificate signing request that can be used by clients to determine when certificate signing request has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this certificate signing request. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `request` - (Required) Base64-encoded PKCS#10 CSR data. -* `signer_name` - (Required) Indicates the requested signer, and is a qualified name. See https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers -* `usages` - (Required) Specifies a set of usage contexts the key will be valid for. See https://godoc.org/k8s.io/api/certificates/v1#KeyUsage - ## Generating a New Certificate Since the certificate is a logical resource that lives only in the Terraform state, it will persist until it is explicitly destroyed by the user. diff --git a/templates/resources/cluster_role.md.tmpl b/templates/resources/cluster_role.md.tmpl index 5f7c3d092d..21eec6653e 100644 --- a/templates/resources/cluster_role.md.tmpl +++ b/templates/resources/cluster_role.md.tmpl @@ -5,14 +5,12 @@ description: |- A ClusterRole creates a role at the cluster level and in all namespaces. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_cluster_role +# {{ .Name }} A ClusterRole creates a role at the cluster level and in all namespaces. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/cluster_role/example_1.tf"}} @@ -21,60 +19,6 @@ A ClusterRole creates a role at the cluster level and in all namespaces. {{tffile "examples/resources/cluster_role/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `rule` - (Optional) The PolicyRoles for this ClusterRole. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole) -* `aggregation_rule` - (Optional) Describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be overwritten by the controller. . For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the cluster role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the cluster role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the cluster role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this cluster role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `rule` - -#### Arguments - -* `api_groups` - (Optional) APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. -* `non_resource_urls` - (Optional) NonResourceURLs is a set of partial urls that a user should have access to. \*s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. -* `resource_names` - (Optional) ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. -* `resources` - (Optional) Resources is a list of resources this rule applies to. ResourceAll represents all resources. -* `verbs` - (Required) Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - -### `aggregation_rule` - -#### Arguments - -* `cluster_role_selectors` - (Optional) A list of selectors which will be used to find ClusterRoles and create the rules. - -### `cluster_role_selectors` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. - ## Import ClusterRole can be imported using the name, e.g. diff --git a/templates/resources/cluster_role_binding.md.tmpl b/templates/resources/cluster_role_binding.md.tmpl index d7d9547d27..853dd048bb 100644 --- a/templates/resources/cluster_role_binding.md.tmpl +++ b/templates/resources/cluster_role_binding.md.tmpl @@ -5,66 +5,16 @@ description: |- A ClusterRoleBinding may be used to grant permission at the cluster level and in all namespaces. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +A ClusterRoleBinding may be used to grant permission at the cluster level and in all namespaces. -# kubernetes_cluster_role_binding - -A ClusterRoleBinding may be used to grant permission at the cluster level and in all namespaces +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/cluster_role_binding/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `role_ref` - (Required) The ClusterRole to bind Subjects to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) -* `subject` - (Required) The Users, Groups, or ServiceAccounts to grant permissions to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-subjects) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the cluster role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the cluster role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the cluster role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this cluster role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `role_ref` - -#### Arguments - -* `name` - (Required) The name of this ClusterRole to bind Subjects to. -* `kind` - (Required) The type of binding to use. This value must be and defaults to `ClusterRole` -* `api_group` - (Required) The API group to drive authorization decisions. This value must be and defaults to `rbac.authorization.k8s.io` - -### `subject` - -#### Arguments - -* `name` - (Required) The name of this ClusterRole to bind Subjects to. -* `namespace` - (Optional) Namespace defines the namespace of the ServiceAccount to bind to. This value only applies to kind `ServiceAccount` -* `kind` - (Required) The type of binding to use. This value must be `ServiceAccount`, `User` or `Group` -* `api_group` - (Required) The API group to drive authorization decisions. This value only applies to kind `User` and `Group`. It must be `rbac.authorization.k8s.io` - ## Import ClusterRoleBinding can be imported using the name, e.g. diff --git a/templates/resources/cluster_role_binding_v1.md.tmpl b/templates/resources/cluster_role_binding_v1.md.tmpl index 37491eb358..d0f0282ce3 100644 --- a/templates/resources/cluster_role_binding_v1.md.tmpl +++ b/templates/resources/cluster_role_binding_v1.md.tmpl @@ -5,66 +5,16 @@ description: |- A ClusterRoleBinding may be used to grant permission at the cluster level and in all namespaces. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_cluster_role_binding_v1 - -A ClusterRoleBinding may be used to grant permission at the cluster level and in all namespaces +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/cluster_role_binding_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `role_ref` - (Required) The ClusterRole to bind Subjects to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) -* `subject` - (Required) The Users, Groups, or ServiceAccounts to grant permissions to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-subjects) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the cluster role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the cluster role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the cluster role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this cluster role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `role_ref` - -#### Arguments - -* `name` - (Required) The name of this ClusterRole to bind Subjects to. -* `kind` - (Required) The type of binding to use. This value must be and defaults to `ClusterRole` -* `api_group` - (Required) The API group to drive authorization decisions. This value must be and defaults to `rbac.authorization.k8s.io` - -### `subject` - -#### Arguments - -* `name` - (Required) The name of this ClusterRole to bind Subjects to. -* `namespace` - (Optional) Namespace defines the namespace of the ServiceAccount to bind to. This value only applies to kind `ServiceAccount` -* `kind` - (Required) The type of binding to use. This value must be `ServiceAccount`, `User` or `Group` -* `api_group` - (Required) The API group to drive authorization decisions. This value only applies to kind `User` and `Group`. It must be `rbac.authorization.k8s.io` - ## Import ClusterRoleBinding can be imported using the name, e.g. diff --git a/templates/resources/cluster_role_v1.md.tmpl b/templates/resources/cluster_role_v1.md.tmpl index e89290e3b8..25796544ae 100644 --- a/templates/resources/cluster_role_v1.md.tmpl +++ b/templates/resources/cluster_role_v1.md.tmpl @@ -5,13 +5,11 @@ description: |- A ClusterRole creates a role at the cluster level and in all namespaces. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_cluster_role_v1 - -A ClusterRole creates a role at the cluster level and in all namespaces. +{{ .SchemaMarkdown }} ## Example Usage @@ -21,60 +19,6 @@ A ClusterRole creates a role at the cluster level and in all namespaces. {{tffile "examples/resources/cluster_role_v1/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `rule` - (Optional) The PolicyRoles for this ClusterRole. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole) -* `aggregation_rule` - (Optional) Describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be overwritten by the controller. . For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the cluster role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the cluster role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the cluster role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this cluster role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `rule` - -#### Arguments - -* `api_groups` - (Optional) APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. -* `non_resource_urls` - (Optional) NonResourceURLs is a set of partial urls that a user should have access to. \*s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. -* `resource_names` - (Optional) ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. -* `resources` - (Optional) Resources is a list of resources this rule applies to. '\*' represents all resources. -* `verbs` - (Required) Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. '\*' represents all kinds. - -### `aggregation_rule` - -#### Arguments - -* `cluster_role_selectors` - (Optional) A list of selectors which will be used to find ClusterRoles and create the rules. - -### `cluster_role_selectors` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. - ## Import ClusterRole can be imported using the name, e.g. diff --git a/templates/resources/config_map.md.tmpl b/templates/resources/config_map.md.tmpl index f47962a92a..71bcb9199f 100644 --- a/templates/resources/config_map.md.tmpl +++ b/templates/resources/config_map.md.tmpl @@ -5,51 +5,16 @@ description: |- The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_config_map +# {{ .Name }} The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes. Config Map can be used to store fine-grained information like individual properties or coarse-grained information like entire config files or JSON blobs. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/config_map/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `binary_data` - (Optional) BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. This field only accepts base64-encoded payloads that will be decoded/received before being sent/received to the apiserver. -* `data` - (Optional) Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. -* `immutable` - (Optional) Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. -* `metadata` - (Required) Standard config map's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the config map that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the config map. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the config map, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the config map must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this config map that can be used by clients to determine when config map has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this config map. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import Config Map can be imported using its namespace and name, e.g. diff --git a/templates/resources/config_map_v1.md.tmpl b/templates/resources/config_map_v1.md.tmpl index c1362515f4..e1811cfd07 100644 --- a/templates/resources/config_map_v1.md.tmpl +++ b/templates/resources/config_map_v1.md.tmpl @@ -5,51 +5,16 @@ description: |- The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_config_map_v1 - -The resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes. Config Map can be used to store fine-grained information like individual properties or coarse-grained information like entire config files or JSON blobs. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/config_map_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `binary_data` - (Optional) BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. This field only accepts base64-encoded payloads that will be decoded/received before being sent/received to the apiserver. -* `data` - (Optional) Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. -* `immutable` - (Optional) Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. -* `metadata` - (Required) Standard config map's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the config map that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the config map. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the config map, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the config map must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this config map that can be used by clients to determine when config map has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this config map. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import Config Map can be imported using its namespace and name, e.g. diff --git a/templates/resources/config_map_v1_data.md.tmpl b/templates/resources/config_map_v1_data.md.tmpl index 41d4468583..4197f6713c 100644 --- a/templates/resources/config_map_v1_data.md.tmpl +++ b/templates/resources/config_map_v1_data.md.tmpl @@ -5,36 +5,16 @@ description: |- This resource allows Terraform to manage the data for a ConfigMap that already exists --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_config_map_v1_data - -This resource allows Terraform to manage data within a pre-existing ConfigMap. This resource uses [field management](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) to manage only the data that is defined in the Terraform configuration. Existing data not specified in the configuration will be ignored. If data specified in the config and is already managed by another client it will cause a conflict which can be overridden by setting `force` to true. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/config_map_v1_data/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard metadata of the ConfigMap. -* `data` - (Required) A map of data to apply to the ConfigMap. -* `force` - (Optional) Force management of the configured data if there is a conflict. -* `field_manager` - (Optional) The name of the [field manager](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management). Defaults to `Terraform`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `name` - (Required) Name of the ConfigMap. -* `namespace` - (Optional) Namespace of the ConfigMap. - ## Import This resource does not support the `import` command. As this resource operates on Kubernetes resources that already exist, creating the resource is equivalent to importing it. diff --git a/templates/resources/cron_job.md.tmpl b/templates/resources/cron_job.md.tmpl index 127aeb690f..67ed91aa69 100644 --- a/templates/resources/cron_job.md.tmpl +++ b/templates/resources/cron_job.md.tmpl @@ -5,11 +5,7 @@ description: |- A Cron Job creates Jobs on a time-based schedule. One CronJob object is like one line of a crontab (cron table) file. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_cron_job +# {{ .Name }} A Cron Job creates Jobs on a time-based schedule. @@ -19,122 +15,8 @@ Note: All CronJob `schedule` times are based on the timezone of the master where ~> NOTE: With the release of Kubernetes v1.25, CronJob batch/v1beta1 has been removed. You can read more information about migrating to batch/v1 in the [Kubernetes 1.25 migration guide](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#cronjob-v125). +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/cron_job/example_1.tf"}} - -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource's metadata. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `spec` - (Required) Spec defines the behavior of a CronJob. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `concurrency_policy` - (Optional) Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one -* `failed_jobs_history_limit` - (Optional) The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. -* `job_template` - (Required) Specifies the job that will be created when executing a CronJob. -* `schedule` - (Required) The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. -* `starting_deadline_seconds` - (Optional) Deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. -* `successful_jobs_history_limit` - (Optional) The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. -* `suspend` - (Optional) This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. - -### `job_template` - -#### Arguments - -* `metadata` - (Required) Standard object's metadata of the jobs created from this template. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Specification of the desired behavior of the job. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -### `metadata` - -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: - -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. - -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. - -### `spec` - -#### Arguments - -* `active_deadline_seconds` - (Optional) Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. -* `backoff_limit` - (Optional) Specifies the number of retries before marking this job failed. Defaults to 6 -* `completions` - (Optional) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `manual_selector` - (Optional) Controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector -* `pod_failure_policy` - (Optional) Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure. -* `parallelism` - (Optional) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when `((.spec.completions - .status.successful) < .spec.parallelism)`, i.e. when the work left to do is less than max parallelism. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `selector` - (Optional) A label query over pods that should match the pod count. Normally, the system sets this field for you. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors -* `template` - (Optional) Describes the pod that will be created when executing a job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `ttl_seconds_after_finished` - (Optional) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. - -### `pod_failure_policy` - -#### Arguments - -* `rule` - (Required) A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. - -### `rule` - -#### Arguments - -* `action` - (Optional) Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. -* `on_exit_codes` - (Optional) Represents the requirement on the container exit codes. -* `on_pod_condition` - (Optional) Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. - -### `on_exit_codes` - -#### Arguments - -* `container_name` - (Optional) Restricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template. -* `operator` - (Optional) Represents the relationship between the container exit code(s) and the specified values. -* `values` - (Required) Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. - -### `on_pod_condition` - -#### Arguments - -* `status` - (Optional) Specifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True. -* `type` - (Optional) Specifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type. - -### `selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. - -### `template` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod.html#spec) for reference. diff --git a/templates/resources/cron_job_v1.md.tmpl b/templates/resources/cron_job_v1.md.tmpl index 3ad725b589..b4ecc2b162 100644 --- a/templates/resources/cron_job_v1.md.tmpl +++ b/templates/resources/cron_job_v1.md.tmpl @@ -5,135 +5,12 @@ description: |- A Cron Job creates Jobs on a time-based schedule. One CronJob object is like one line of a crontab (cron table) file. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_cron_job_v1 - -A Cron Job creates Jobs on a time-based schedule. - -One CronJob object is like one line of a crontab (cron table) file. It runs a job periodically on a given schedule, written in Cron format. - -Note: All CronJob `schedule` times are based on the timezone of the master where the job is initiated. For instructions on creating and working with cron jobs, and for an example of a spec file for a cron job, see [Kubernetes reference](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/). +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/cron_job_v1/example_1.tf"}} - -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource's metadata. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `spec` - (Required) Spec defines the behavior of a CronJob. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `concurrency_policy` - (Optional) Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one -* `failed_jobs_history_limit` - (Optional) The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. -* `job_template` - (Required) Specifies the job that will be created when executing a CronJob. -* `schedule` - (Required) The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. -* `timezone` - (Optional) The time zone for the given schedule. If not specified, this will rely on the time zone of the kube-controller-manager process. -* `starting_deadline_seconds` - (Optional) Deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. -* `successful_jobs_history_limit` - (Optional) The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. -* `suspend` - (Optional) This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. - -### `job_template` - -#### Arguments - -* `metadata` - (Required) Standard object's metadata of the jobs created from this template. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Specification of the desired behavior of the job. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -### `metadata` - -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: - -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. - -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. - -### `spec` - -#### Arguments - -* `active_deadline_seconds` - (Optional) Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. -* `backoff_limit` - (Optional) Specifies the number of retries before marking this job failed. Defaults to 6 -* `completions` - (Optional) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `manual_selector` - (Optional) Controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector -* `pod_failure_policy` - (Optional) Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure. -* `parallelism` - (Optional) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when `((.spec.completions - .status.successful) < .spec.parallelism)`, i.e. when the work left to do is less than max parallelism. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `selector` - (Optional) A label query over pods that should match the pod count. Normally, the system sets this field for you. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors -* `template` - (Optional) Describes the pod that will be created when executing a job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `ttl_seconds_after_finished` - (Optional) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. - -### `pod_failure_policy` - -#### Arguments - -* `rule` - (Required) A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. - -### `rule` - -#### Arguments - -* `action` - (Optional) Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. -* `on_exit_codes` - (Optional) Represents the requirement on the container exit codes. -* `on_pod_condition` - (Optional) Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. - -### `on_exit_codes` - -#### Arguments - -* `container_name` - (Optional) Restricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template. -* `operator` - (Optional) Represents the relationship between the container exit code(s) and the specified values. -* `values` - (Required) Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. - -### `on_pod_condition` - -#### Arguments - -* `status` - (Optional) Specifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True. -* `type` - (Optional) Specifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type. - -### `selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. - -### `template` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod.html#spec) for reference. diff --git a/templates/resources/csi_driver.md.tmpl b/templates/resources/csi_driver.md.tmpl index 16a8ce167e..0a0bc3652f 100644 --- a/templates/resources/csi_driver.md.tmpl +++ b/templates/resources/csi_driver.md.tmpl @@ -5,54 +5,16 @@ description: |- The Container Storage Interface (CSI) is a standard for exposing arbitrary block and file storage systems to containerized workloads on Container Orchestration Systems (COs) like Kubernetes. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_csi_driver +# {{ .Name }} The [Container Storage Interface](https://kubernetes-csi.github.io/docs/introduction.html) (CSI) is a standard for exposing arbitrary block and file storage systems to containerized workloads on Container Orchestration Systems (COs) like Kubernetes. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/csi_driver/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard CSI driver's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) The Specification of the CSI Driver. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the csi driver that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the csi driver. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -### `spec` - -#### Arguments - -* `attach_required` - (Required) Indicates if the CSI volume driver requires an attachment operation. -* `pod_info_on_mount` - (Optional) Indicates that the CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. -* `volume_lifecycle_modes` - (Optional) A list of volume types the CSI volume driver supports. values can be `Persistent` and `Ephemeral`. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this csi driver that can be used by clients to determine when csi driver has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this csi driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import kubernetes_csi_driver can be imported using its name, e.g. diff --git a/templates/resources/csi_driver_v1.md.tmpl b/templates/resources/csi_driver_v1.md.tmpl index 5602da609b..1728d5289a 100644 --- a/templates/resources/csi_driver_v1.md.tmpl +++ b/templates/resources/csi_driver_v1.md.tmpl @@ -5,54 +5,16 @@ description: |- The Container Storage Interface (CSI) is a standard for exposing arbitrary block and file storage systems to containerized workloads on Container Orchestration Systems (COs) like Kubernetes. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_csi_driver_v1 - -The [Container Storage Interface](https://kubernetes-csi.github.io/docs/introduction.html) (CSI) is a standard for exposing arbitrary block and file storage systems to containerized workloads on Container Orchestration Systems (COs) like Kubernetes. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/csi_driver_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard CSI driver's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) The Specification of the CSI Driver. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the csi driver that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the csi driver. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -### `spec` - -#### Arguments - -* `attach_required` - (Required) Indicates if the CSI volume driver requires an attachment operation. -* `pod_info_on_mount` - (Optional) Indicates that the CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. -* `volume_lifecycle_modes` - (Optional) A list of volume types the CSI volume driver supports. values can be `Persistent` and `Ephemeral`. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this csi driver that can be used by clients to determine when csi driver has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this csi driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import kubernetes_csi_driver_v1 can be imported using its name, e.g. diff --git a/templates/resources/daemon_set_v1.md.tmpl b/templates/resources/daemon_set_v1.md.tmpl index 201d618a96..9adb56a5d3 100644 --- a/templates/resources/daemon_set_v1.md.tmpl +++ b/templates/resources/daemon_set_v1.md.tmpl @@ -5,827 +5,16 @@ description: |- A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_daemon_set_v1 - -A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/daemon_set_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard daemonset's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the daemonset. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the deployment to successfully roll out. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the deployment that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the deployment. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). **Must match `selector`**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the deployment, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the deployment must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this deployment that can be used by clients to determine when deployment has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this deployment. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `revision_history_limit` - (Optional) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. -* `strategy` - (Optional) The update strategy to use to replace existing pods with new ones. -* `selector` - (Optional) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this deployment. **Must match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) -* `template` - (Required) Describes the pod that will be created per Node. This takes precedence over a TemplateRef. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#pod-template) - -### `strategy` - -#### Arguments - -* `type` - Type of daemon set update. Can be 'RollingUpdate' or 'OnDelete'. Default is 'RollingUpdate'. -* `rolling_update` - Rolling update config params. Present only if type = 'RollingUpdate'. - -### `rolling_update` - -#### Arguments - -* `max_unavailable` - The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. - -### `template` - -#### Arguments - -* `metadata` - (Required) Standard object's metadata. For more info see https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata. -* `spec` - (Required) Specification of the desired behavior of the pod. For more info see https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. - -### template `metadata` - -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: - -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. - -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. - -Please see the [Pod resource](pod_v1.html#metadata) for reference. - -### template `spec` - -#### Arguments - -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true`. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) - -### `affinity` - -#### Arguments - -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) - -### `node_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` - -#### Arguments - -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. - -## `node_selector_term` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -### `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `preference` - (Required) A node selector term, associated with the corresponding weight. - -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - -### `preference` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -## `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `pod_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `pod_anti_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) - -#### Arguments - -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Required) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. - -### `container` - -#### Arguments - -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. - -### `aws_elastic_block_store` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) - -### `azure_disk` - -#### Arguments - -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). - -### `azure_file` - -#### Arguments - -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name - -### `capabilities` - -#### Arguments - -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities - -### `ceph_fs` - -#### Arguments - -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is / -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. - -### `cinder` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. - -### `config_map` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `config_map_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined - -### `config_map_key_ref` - -#### Arguments - -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap or its key must be defined - -### `dns_config` - -#### Arguments - -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. - -The `option` block supports the following: - -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. - -### `downward_api` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. - -### `empty_dir` - -#### Arguments - -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). - -### `env` - -#### Arguments - -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value - -### `env_from` - -#### Arguments - -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from - -### `exec` - -#### Arguments - -* `command` - (Optional) 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. 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. - -### `fc` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) - -### `field_ref` - -#### Arguments - -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version - -### `flex_volume` - -#### Arguments - -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. - -### `flocker` - -#### Arguments - -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset - -### `gce_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) - -### `git_repo` - -#### Arguments - -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. - -### `glusterfs` - -#### Arguments - -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. - -### `grpc` - -#### Arguments - -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. - -### `host_aliases` - -#### Arguments - -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. - -### `host_path` - -#### Arguments - -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) - -### `http_get` - -#### Arguments - -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. - -### `http_header` - -#### Arguments - -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value - -### `image_pull_secrets` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `iscsi` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). - -### `items` - -#### Arguments - -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. - -### `lifecycle` - -#### Arguments - -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) - -### `liveness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `nfs` - -#### Arguments - -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) - -### `persistent_volume_claim` - -#### Arguments - -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. - -### `photon_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk - -### `port` - -#### Arguments - -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". - -### `post_start` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `pre_stop` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `quobyte` - -#### Arguments - -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. - -### `rbd` - -#### Arguments - -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. - -### `readiness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `resources` - -#### Arguments - -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. - -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. - -Please, look at the example below: - -{{tffile "examples/resources/daemon_set_v1/example_2.tf"}} - -### `resource_field_ref` - -#### Arguments - -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". - -### `seccomp_profile` - -#### Attributes - -* `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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. - -### `se_linux_options` - -#### Arguments - -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. - -### `secret` - -#### Arguments - -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) - -The `items` block supports the following: - -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. - -### `secret_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined - -### `secret_key_ref` - -#### Arguments - -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined - -### `secret_ref` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### container `security_context` - -#### Arguments - -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. - -### `capabilities` - -#### Arguments - -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. - -### pod `security_context` - -#### Arguments - -* `fs_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. - -##### Sysctl - -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. - -### `tcp_socket` - -#### Arguments - -* `port` - (Required) 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. - -### `value_from` - -#### Arguments - -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. - -### `toleration` - -#### Arguments - -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - -### `projected` - -#### Arguments - -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources - -### `sources` - -#### Arguments - -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). - -### `service_account_token` - -#### Arguments - -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. - -### `volume` - -#### Arguments - -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine - -### `volume_mount` - -#### Arguments - -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) - -### `vsphere_volume` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk - -### `ephemeral` - -#### Arguments - -* `volume_claim_template` - (Required) 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. - -### `volume_claim_template` - -#### Arguments - -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_daemon_set_v1` resource: - -* `create` - (Default `10 minutes`) Used for creating new controller -* `update` - (Default `10 minutes`) Used for updating a controller -* `delete` - (Default `10 minutes`) Used for destroying a controller - ## Import DaemonSet can be imported using the namespace and name, e.g. diff --git a/templates/resources/daemonset.md.tmpl b/templates/resources/daemonset.md.tmpl index 001968b15f..102b5020a9 100644 --- a/templates/resources/daemonset.md.tmpl +++ b/templates/resources/daemonset.md.tmpl @@ -5,839 +5,16 @@ description: |- A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_daemonset +# {{ .Name }} A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/daemonset/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard daemonset's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the daemonset. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the deployment to successfully roll out. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the deployment that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the deployment. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). **Must match `selector`**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the deployment, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the deployment must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this deployment that can be used by clients to determine when deployment has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this deployment. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `revision_history_limit` - (Optional) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. -* `strategy` - (Optional) The update strategy to use to replace existing pods with new ones. -* `selector` - (Optional) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this deployment. **Must match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) -* `template` - (Required) Describes the pod that will be created per Node. This takes precedence over a TemplateRef. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#pod-template) - -### `strategy` - -#### Arguments - -* `type` - Type of daemon set update. Can be 'RollingUpdate' or 'OnDelete'. Default is 'RollingUpdate'. -* `rolling_update` - Rolling update config params. Present only if type = 'RollingUpdate'. - -### `rolling_update` - -#### Arguments - -* `max_unavailable` - The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. - -### `template` - -#### Arguments - -* `metadata` - (Required) Standard object's metadata. For more info see https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata. -* `spec` - (Required) Specification of the desired behavior of the pod. For more info see https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. - -### template `metadata` - -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: - -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. - -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. - -Please see the [Pod resource](pod_v1.html#metadata) for reference. - -### template `spec` - -#### Arguments - -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true`. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) - -### `affinity` - -#### Arguments - -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) - -### `node_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` - -#### Arguments - -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. - -## `node_selector_term` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -### `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `preference` - (Required) A node selector term, associated with the corresponding weight. - -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - -### `preference` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -## `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `pod_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `pod_anti_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) - -#### Arguments - -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Optional) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. - -### `container` - -#### Arguments - -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. - -### `aws_elastic_block_store` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) - -### `azure_disk` - -#### Arguments - -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). - -### `azure_file` - -#### Arguments - -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name - -### `capabilities` - -#### Arguments - -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities - -### `ceph_fs` - -#### Arguments - -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is / -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. - -### `cinder` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. - -### `config_map` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `config_map_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined - -### `config_map_key_ref` - -#### Arguments - -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap or its key must be defined - -### `csi` - -#### Arguments - -* `driver` - (Required) the name of the volume driver to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_attributes` - (Optional) Attributes of the volume to publish. -* `fs_type` - (Optional) Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. `ext4`, `xfs`, `ntfs`. -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to `true`. If omitted, the default is `false`. -* `node_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. - -### `dns_config` - -#### Arguments - -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. - -The `option` block supports the following: - -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. - -### `downward_api` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. - -### `empty_dir` - -#### Arguments - -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). - -### `env` - -#### Arguments - -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value - -### `env_from` - -#### Arguments - -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from - -### `exec` - -#### Arguments - -* `command` - (Optional) 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. 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. - -### `fc` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) - -### `field_ref` - -#### Arguments - -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version - -### `flex_volume` - -#### Arguments - -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. - -### `flocker` - -#### Arguments - -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset - -### `gce_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) - -### `git_repo` - -#### Arguments - -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. - -### `glusterfs` - -#### Arguments - -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. - -### `grpc` - -#### Arguments - -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. - -### `host_aliases` - -#### Arguments - -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. - -### `host_path` - -#### Arguments - -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) - -### `http_get` - -#### Arguments - -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. - -### `http_header` - -#### Arguments - -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value - -### `image_pull_secrets` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `iscsi` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). - -### `items` - -#### Arguments - -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. - -### `lifecycle` - -#### Arguments - -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) - -### `liveness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `nfs` - -#### Arguments - -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) - -### `persistent_volume_claim` - -#### Arguments - -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. - -### `photon_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk - -### `port` - -#### Arguments - -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". - -### `post_start` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `pre_stop` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `quobyte` - -#### Arguments - -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. - -### `rbd` - -#### Arguments - -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. - -### `readiness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `resources` - -#### Arguments - -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. - -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. - -Please, look at the example below: - -{{tffile "examples/resources/daemonset/example_2.tf"}} - -### `resource_field_ref` - -#### Arguments - -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". - -### `seccomp_profile` - -#### Attributes - -* `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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. - -### `se_linux_options` - -#### Arguments - -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. - -### `secret` - -#### Arguments - -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) - -The `items` block supports the following: - -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. - -### `secret_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined - -### `secret_key_ref` - -#### Arguments - -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined - -### `secret_ref` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### container `security_context` - -#### Arguments - -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `fs_group_change_policy` - 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. - -### `capabilities` - -#### Arguments - -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. - -### pod `security_context` - -#### Arguments - -* `fs_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. - -##### Sysctl - -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. - -### `tcp_socket` - -#### Arguments - -* `port` - (Required) 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. - -### `value_from` - -#### Arguments - -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. - -### `toleration` - -#### Arguments - -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - -### `projected` - -#### Arguments - -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources - -### `sources` - -#### Arguments - -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). - -### `service_account_token` - -#### Arguments - -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. - -### `volume` - -#### Arguments - -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `csi` - (Optional) CSI represents storage that is handled by an external CSI driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi) -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine - -### `volume_mount` - -#### Arguments - -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) - -### `vsphere_volume` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk - -### `ephemeral` - -#### Arguments - -* `volume_claim_template` - (Required) 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. - -### `volume_claim_template` - -#### Arguments - -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_daemonset` resource: - -* `create` - (Default `10 minutes`) Used for creating new controller -* `update` - (Default `10 minutes`) Used for updating a controller -* `delete` - (Default `10 minutes`) Used for destroying a controller - ## Import DaemonSet can be imported using the namespace and name, e.g. diff --git a/templates/resources/default_service_account.md.tmpl b/templates/resources/default_service_account.md.tmpl index 692c9aae78..7e0ea4de38 100644 --- a/templates/resources/default_service_account.md.tmpl +++ b/templates/resources/default_service_account.md.tmpl @@ -5,75 +5,18 @@ description: |- The default service account resource configures the default service account created by Kubernetes in each namespace. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_default_service_account +# {{ .Name }} Kubernetes creates a "default" service account in each namespace. This is the service account that will be assigned by default to pods in the namespace. The `kubernetes_default_service_account` resource behaves differently from normal resources. The service account is created by a Kubernetes controller and Terraform "adopts" it into management. This resource should only be used once per namespace. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/default_service_account/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard service account's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `image_pull_secret` - (Optional) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `secret` - (Optional) A list of secrets allowed to be used by pods running using this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/secret) -* `automount_service_account_token` - (Optional) Boolean, `true` to enable automatic mounting of the service account token. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `namespace` - (Optional) Namespace defines the namespace where Terraform will adopt the default service account. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `image_pull_secret` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `secret` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are exported: - -* `default_secret_name` - (Deprecated) Name of the default secret, containing service account token, created & managed by the service. By default, the provider will try to find the secret containing the service account token that Kubernetes automatically created for the service account. Where there are multiple tokens and the provider cannot determine which was created by Kubernetes, this attribute will be empty. When only one token is associated with the service account, the provider will return this single token secret. - - Starting from version `1.24.0` by default Kubernetes does not automatically generate tokens for service accounts. That leads to the situation when `default_secret_name` cannot be computed and thus will be an empty string. In order to create a service account token, please [use `kubernetes_secret_v1` resource](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret_v1#example-usage-service-account-token) - -## Destroying - -If you remove a `kubernetes_default_service_account` resource from your configuration, Terraform will send a delete request to the Kubernetes API. Kubernetes will automatically replace this service account, but any customizations will be lost. If you no longer want to manage a default service account with Terraform, use `terraform state rm` to remove it from state before removing the configuration. - ## Import The default service account can be imported using the namespace and name, e.g. diff --git a/templates/resources/default_service_account_v1.md.tmpl b/templates/resources/default_service_account_v1.md.tmpl index 681334fc18..f302535ac4 100644 --- a/templates/resources/default_service_account_v1.md.tmpl +++ b/templates/resources/default_service_account_v1.md.tmpl @@ -5,75 +5,18 @@ description: |- The default service account resource configures the default service account created by Kubernetes in each namespace. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_default_service_account_v1 +# {{ .Name }} Kubernetes creates a "default" service account in each namespace. This is the service account that will be assigned by default to pods in the namespace. The `kubernetes_default_service_account_v1` resource behaves differently from normal resources. The service account is created by a Kubernetes controller and Terraform "adopts" it into management. This resource should only be used once per namespace. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/default_service_account_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard service account's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `image_pull_secret` - (Optional) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `secret` - (Optional) A list of secrets allowed to be used by pods running using this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/secret) -* `automount_service_account_token` - (Optional) Boolean, `true` to enable automatic mounting of the service account token. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `namespace` - (Optional) Namespace defines the namespace where Terraform will adopt the default service account. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `image_pull_secret` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `secret` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are exported: - -* `default_secret_name` - (Deprecated) Name of the default secret, containing service account token, created & managed by the service. By default, the provider will try to find the secret containing the service account token that Kubernetes automatically created for the service account. Where there are multiple tokens and the provider cannot determine which was created by Kubernetes, this attribute will be empty. When only one token is associated with the service account, the provider will return this single token secret. - - Starting from version `1.24.0` by default Kubernetes does not automatically generate tokens for service accounts. That leads to the situation when `default_secret_name` cannot be computed and thus will be an empty string. In order to create a service account token, please [use `kubernetes_secret_v1` resource](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret_v1#example-usage-service-account-token) - -## Destroying - -If you remove a `kubernetes_default_service_account_v1` resource from your configuration, Terraform will send a delete request to the Kubernetes API. Kubernetes will automatically replace this service account, but any customizations will be lost. If you no longer want to manage a default service account with Terraform, use `terraform state rm` to remove it from state before removing the configuration. - ## Import The default service account can be imported using the namespace and name, e.g. diff --git a/templates/resources/deployment.md.tmpl b/templates/resources/deployment.md.tmpl index 4248476ab6..330074f8b3 100644 --- a/templates/resources/deployment.md.tmpl +++ b/templates/resources/deployment.md.tmpl @@ -5,843 +5,16 @@ description: |- A Deployment ensures that a specified number of pod “replicas” are running at any one time. In other words, a Deployment makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Deployment will start more. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_deployment +# {{ .Name }} A Deployment ensures that a specified number of pod “replicas” are running at any one time. In other words, a Deployment makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Deployment will start more. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/deployment/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard deployment's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the deployment. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the deployment to successfully roll out. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the deployment that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the deployment. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). **Must match `selector`**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the deployment, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the deployment must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this deployment that can be used by clients to determine when deployment has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this deployment. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `paused` - (Optional) Indicates that the deployment is paused. -* `progress_deadline_seconds` - (Optional) The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. -* `replicas` - (Optional) The number of desired replicas. This attribute is a string to be able to distinguish between explicit zero and not specified. Defaults to 1. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#scaling-a-deployment) -* `revision_history_limit` - (Optional) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. -* `strategy` - (Optional) The deployment strategy to use to replace existing pods with new ones. -* `selector` - (Optional) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this deployment. **Must match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) -* `template` - (Required) Describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#pod-template) - -### `strategy` - -#### Arguments - -* `type` - Type of deployment. Can be 'Recreate' or 'RollingUpdate'. Default is RollingUpdate. -* `rolling_update` - Rolling update config params. Present only if type = RollingUpdate. - -### `rolling_update` - -#### Arguments - -* `max_surge` - The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. -* `max_unavailable` - The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - -### `template` - -#### Arguments - -* `metadata` - (Required) Standard object's metadata. For more info see https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata. -* `spec` - (Required) Specification of the desired behavior of the pod. For more info see https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. - -### template `spec` - -#### Arguments - -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true`. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `readiness_gate` - (Optional) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True". [More info](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-readiness-gate) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `scheduler_name` - (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) - -### `affinity` - -#### Arguments - -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) - -### `node_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` - -#### Arguments - -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. - -## `node_selector_term` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -### `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `preference` - (Required) A node selector term, associated with the corresponding weight. - -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - -### `preference` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -## `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `pod_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `pod_anti_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) - -#### Arguments - -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Optional) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. - -### `container` - -#### Arguments - -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. - -### `readiness_gate` - -#### Arguments - -* `condition_type` - (Required) refers to a condition in the pod's condition list with matching type. - -### `aws_elastic_block_store` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) - -### `azure_disk` - -#### Arguments - -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). - -### `azure_file` - -#### Arguments - -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name - -### `capabilities` - -#### Arguments - -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities - -### `ceph_fs` - -#### Arguments - -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. - -### `cinder` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. - -### `config_map` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `config_map_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined - -### `config_map_key_ref` - -#### Arguments - -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap or its key must be defined - -### `csi` - -#### Arguments - -- `driver` - (Required) the name of the volume driver to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -- `volume_attributes` - (Optional) Attributes of the volume to publish. -- `fs_type` - (Optional) Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. `ext4`, `xfs`, `ntfs`. -- `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to `true`. If omitted, the default is `false`. -- `node_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. - -### `dns_config` - -#### Arguments - -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. - -The `option` block supports the following: - -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. - -### `downward_api` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. - -### `empty_dir` - -#### Arguments - -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). - -### `env` - -#### Arguments - -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value - -### `env_from` - -#### Arguments - -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from - -### `exec` - -#### Arguments - -* `command` - (Optional) 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. 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. - -### `fc` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) - -### `field_ref` - -#### Arguments - -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version - -### `flex_volume` - -#### Arguments - -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. - -### `flocker` - -#### Arguments - -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset - -### `gce_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) - -### `git_repo` - -#### Arguments - -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. - -### `glusterfs` - -#### Arguments - -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. - -### `grpc` - -#### Arguments - -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. - -### `host_aliases` - -#### Arguments - -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. - -### `host_path` - -#### Arguments - -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) - -### `http_get` - -#### Arguments - -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. - -### `http_header` - -#### Arguments - -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value - -### `image_pull_secrets` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `iscsi` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). - -### `items` - -#### Arguments - -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. - -### `lifecycle` - -#### Arguments - -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) - -### `liveness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `nfs` - -#### Arguments - -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) - -### `persistent_volume_claim` - -#### Arguments - -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. - -### `photon_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk - -### `port` - -#### Arguments - -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". - -### `post_start` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `pre_stop` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `quobyte` - -#### Arguments - -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. - -### `rbd` - -#### Arguments - -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. - -### `readiness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `resources` - -#### Arguments - -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. - -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. - -Please, look at the example below: - -{{tffile "examples/resources/deployment/example_2.tf"}} - -### `resource_field_ref` - -#### Arguments - -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". - -### `seccomp_profile` - -#### Attributes - -* `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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. - -### `se_linux_options` - -#### Arguments - -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. - -### `secret` - -#### Arguments - -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) - -The `items` block supports the following: - -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. - -### `secret_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined - -### `secret_key_ref` - -#### Arguments - -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined - -### `secret_ref` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### container `security_context` - -#### Arguments - -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `fs_group_change_policy` - 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. - -### `capabilities` - -#### Arguments - -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. - -### pod `security_context` - -#### Arguments - -* `fs_group` - (Optional) 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. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. - -##### Sysctl - -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. - -### `tcp_socket` - -#### Arguments - -* `port` - (Required) 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. - -### `value_from` - -#### Arguments - -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. - -### `toleration` - -#### Arguments - -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - -### `projected` - -#### Arguments - -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources - -### `sources` - -#### Arguments - -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). - -### `service_account_token` - -#### Arguments - -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. - -### `volume` - -#### Arguments - -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `csi` - (Optional) CSI represents storage that is handled by an external CSI driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi) -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine - -### `volume_mount` - -#### Arguments - -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) - -### `vsphere_volume` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk - -### `ephemeral` - -#### Arguments - -* `volume_claim_template` - (Required) 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. - -### `volume_claim_template` - -#### Arguments - -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_deployment` resource: - -* `create` - (Default `10 minutes`) Used for creating new controller -* `update` - (Default `10 minutes`) Used for updating a controller -* `delete` - (Default `10 minutes`) Used for destroying a controller - ## Import Deployment can be imported using the namespace and name, e.g. diff --git a/templates/resources/deployment_v1.md.tmpl b/templates/resources/deployment_v1.md.tmpl index 2666046c88..9418f19e5d 100644 --- a/templates/resources/deployment_v1.md.tmpl +++ b/templates/resources/deployment_v1.md.tmpl @@ -5,831 +5,16 @@ description: |- A Deployment ensures that a specified number of pod “replicas” are running at any one time. In other words, a Deployment makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Deployment will start more. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_deployment_v1 - -A Deployment ensures that a specified number of pod “replicas” are running at any one time. In other words, a Deployment makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Deployment will start more. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/deployment_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard deployment's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the deployment. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the deployment to successfully roll out. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the deployment that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the deployment. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). **Must match `selector`**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the deployment, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the deployment must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this deployment that can be used by clients to determine when deployment has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this deployment. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `paused` - (Optional) Indicates that the deployment is paused. -* `progress_deadline_seconds` - (Optional) The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. -* `replicas` - (Optional) The number of desired replicas. This attribute is a string to be able to distinguish between explicit zero and not specified. Defaults to 1. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#scaling-a-deployment) -* `revision_history_limit` - (Optional) The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. -* `strategy` - (Optional) The deployment strategy to use to replace existing pods with new ones. -* `selector` - (Optional) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this deployment. **Must match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) -* `template` - (Required) Describes the pod that will be created if insufficient replicas are detected. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#pod-template) - -### `strategy` - -#### Arguments - -* `type` - Type of deployment. Can be 'Recreate' or 'RollingUpdate'. Default is RollingUpdate. -* `rolling_update` - Rolling update config params. Present only if type = RollingUpdate. - -### `rolling_update` - -#### Arguments - -* `max_surge` - The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. -* `max_unavailable` - The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - -### `template` - -#### Arguments - -* `metadata` - (Required) Standard object's metadata. For more info see https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata. -* `spec` - (Required) Specification of the desired behavior of the pod. For more info see https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. - -### template `spec` - -#### Arguments - -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true`. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `readiness_gate` - (Optional) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True". [More info](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-readiness-gate) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `scheduler_name` - (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) - -### `affinity` - -#### Arguments - -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) - -### `node_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` - -#### Arguments - -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. - -## `node_selector_term` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -### `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `preference` - (Required) A node selector term, associated with the corresponding weight. - -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - -### `preference` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -## `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `pod_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `pod_anti_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) - -#### Arguments - -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Optional) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. - -### `container` - -#### Arguments - -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. - -### `readiness_gate` - -#### Arguments - -* `condition_type` - (Required) refers to a condition in the pod's condition list with matching type. - -### `aws_elastic_block_store` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) - -### `azure_disk` - -#### Arguments - -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). - -### `azure_file` - -#### Arguments - -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name - -### `capabilities` - -#### Arguments - -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities - -### `ceph_fs` - -#### Arguments - -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. - -### `cinder` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. - -### `config_map` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `config_map_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined - -### `config_map_key_ref` - -#### Arguments - -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap or its key must be defined - -### `dns_config` - -#### Arguments - -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. - -The `option` block supports the following: - -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. - -### `downward_api` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. - -### `empty_dir` - -#### Arguments - -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). - -### `env` - -#### Arguments - -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value - -### `env_from` - -#### Arguments - -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from - -### `exec` - -#### Arguments - -* `command` - (Optional) 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. 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. - -### `fc` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) - -### `field_ref` - -#### Arguments - -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version - -### `flex_volume` - -#### Arguments - -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. - -### `flocker` - -#### Arguments - -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset - -### `gce_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) - -### `git_repo` - -#### Arguments - -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. - -### `glusterfs` - -#### Arguments - -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. - -### `grpc` - -#### Arguments - -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. - -### `host_aliases` - -#### Arguments - -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. - -### `host_path` - -#### Arguments - -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) - -### `http_get` - -#### Arguments - -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. - -### `http_header` - -#### Arguments - -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value - -### `image_pull_secrets` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `iscsi` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). - -### `items` - -#### Arguments - -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. - -### `lifecycle` - -#### Arguments - -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) - -### `liveness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `nfs` - -#### Arguments - -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) - -### `persistent_volume_claim` - -#### Arguments - -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. - -### `photon_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk - -### `port` - -#### Arguments - -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". - -### `post_start` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `pre_stop` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `quobyte` - -#### Arguments - -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. - -### `rbd` - -#### Arguments - -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd#how-to-use-it. - -### `readiness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `resources` - -#### Arguments - -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. - -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. - -Please, look at the example below: - -{{tffile "examples/resources/deployment_v1/example_2.tf"}} - -### `resource_field_ref` - -#### Arguments - -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". - -### `seccomp_profile` - -#### Attributes - -* `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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. - -### `se_linux_options` - -#### Arguments - -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. - -### `secret` - -#### Arguments - -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) - -The `items` block supports the following: - -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. - -### `secret_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined - -### `secret_key_ref` - -#### Arguments - -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined - -### `secret_ref` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### container `security_context` - -#### Arguments - -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. - -### `capabilities` - -#### Arguments - -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. - -### pod `security_context` - -#### Arguments - -* `fs_group` - (Optional) 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. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. - -##### Sysctl - -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. - -### `tcp_socket` - -#### Arguments - -* `port` - (Required) 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. - -### `value_from` - -#### Arguments - -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. - -### `toleration` - -#### Arguments - -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - -### `projected` - -#### Arguments - -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources - -### `sources` - -#### Arguments - -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). - -### `service_account_token` - -#### Arguments - -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. - -### `volume` - -#### Arguments - -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine - -### `volume_mount` - -#### Arguments - -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) - -### `vsphere_volume` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk - -### `ephemeral` - -#### Arguments - -* `volume_claim_template` - (Required) 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. - -### `volume_claim_template` - -#### Arguments - -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_deployment_v1` resource: - -* `create` - (Default `10 minutes`) Used for creating new controller -* `update` - (Default `10 minutes`) Used for updating a controller -* `delete` - (Default `10 minutes`) Used for destroying a controller - ## Import Deployment can be imported using the namespace and name, e.g. diff --git a/templates/resources/endpoint_slice_v1.md.tmpl b/templates/resources/endpoint_slice_v1.md.tmpl index dd590505d1..6fc46df99b 100644 --- a/templates/resources/endpoint_slice_v1.md.tmpl +++ b/templates/resources/endpoint_slice_v1.md.tmpl @@ -5,84 +5,13 @@ description: |- An EndpointSlice contains references to a set of network endpoints. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_endpoints_slice_v1 - -An EndpointSlice contains references to a set of network endpoints. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/endpoint_slice_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard endpoints' metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `address_type` - (Required) Specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: *IPv4: Represents an IPv4 Address.* IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. -* `endpoint` - (Required) A list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. -* `port` - (Required) Specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the endpoints resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the endpoints resource. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the endpoints resource, must be unique. Cannot be updated. This name should correspond with an accompanying Service resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the endpoints resource must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this endpoints resource that can be used by clients to determine when endpoints resource has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this endpoints resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `endpoint` - -#### Arguments - -* `addresses` - (Required) addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. -* `condition` - (Optional) Contains information about the current status of the endpoint. -* `hostname` - (Optional) hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. -* `node_name` - (Optional) Represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. -* `target_ref` - (Optional) targetRef is a reference to a Kubernetes object that represents this endpoint. -* `zone` - (Optional) The name of the Zone this endpoint exists in. - -### `condition` - -#### Attributes - -* `ready` - (Optional) Indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. -* `serving` - (Optional) Serving is identical to ready except that it is set regardless of the terminating state of endpoints. -* `terminating` - (Optional) Indicates that this endpoint is terminating. - -### `target_ref` - -#### Attributes - -* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). -* `hostname` - (Optional) The Hostname of this endpoint. -* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node. -* `zone` - (Optional) The name of the zone this endpoint exists in. - -### `port` - -#### Arguments - -* `name` - (Optional) The name of this port within the endpoint. All ports within the endpoint must have unique names. Optional if only one port is defined on this endpoint. -* `port` - (Required) The port that will be utilized by this endpoint. -* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. -* `app_protocol` - (Optional) The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. diff --git a/templates/resources/endpoints.md.tmpl b/templates/resources/endpoints.md.tmpl index 27476a9e6c..c922147ee7 100644 --- a/templates/resources/endpoints.md.tmpl +++ b/templates/resources/endpoints.md.tmpl @@ -5,81 +5,16 @@ description: |- An Endpoints resource is an abstraction, linked to a Service, which defines the list of endpoints that actually implement the service. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_endpoints +# {{ .Name }} An Endpoints resource is an abstraction, linked to a Service, which defines the list of endpoints that actually implement the service. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/endpoints/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard endpoints' metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `subset` - (Optional) Set of addresses and ports that comprise a service. Can be repeated multiple times. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the endpoints resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the endpoints resource. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the endpoints resource, must be unique. Cannot be updated. This name should correspond with an accompanying Service resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the endpoints resource must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this endpoints resource that can be used by clients to determine when endpoints resource has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this endpoints resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `subset` - -#### Arguments - -* `address` - (Optional) An IP address block which offers the related ports and is ready to accept traffic. These endpoints should be considered safe for load balancers and clients to utilize. Can be repeated multiple times. -* `not_ready_address` - (Optional) A IP address block which offers the related ports but is not currently marked as ready because it have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. Can be repeated multiple times. -* `port` - (Optional) A port number block available on the related IP addresses. Can be repeated multiple times. - -### `address` - -#### Attributes - -* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). -* `hostname` - (Optional) The Hostname of this endpoint. -* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node. - -### `not_ready_address` - -#### Attributes - -* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). -* `hostname` - (Optional) The Hostname of this endpoint. -* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node. - -### `port` - -#### Arguments - -* `name` - (Optional) The name of this port within the endpoint. All ports within the endpoint must have unique names. Optional if only one port is defined on this endpoint. -* `port` - (Required) The port that will be utilized by this endpoint. -* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. - ## Import An Endpoints resource can be imported using its namespace and name, e.g. diff --git a/templates/resources/endpoints_v1.md.tmpl b/templates/resources/endpoints_v1.md.tmpl index 05767d2295..6c9b71b0b8 100644 --- a/templates/resources/endpoints_v1.md.tmpl +++ b/templates/resources/endpoints_v1.md.tmpl @@ -5,81 +5,16 @@ description: |- An Endpoints resource is an abstraction, linked to a Service, which defines the list of endpoints that actually implement the service. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_endpoints_v1 - -An Endpoints resource is an abstraction, linked to a Service, which defines the list of endpoints that actually implement the service. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/endpoints_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard endpoints' metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `subset` - (Optional) Set of addresses and ports that comprise a service. Can be repeated multiple times. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the endpoints resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the endpoints resource. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the endpoints resource, must be unique. Cannot be updated. This name should correspond with an accompanying Service resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the endpoints resource must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this endpoints resource that can be used by clients to determine when endpoints resource has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this endpoints resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `subset` - -#### Arguments - -* `address` - (Optional) An IP address block which offers the related ports and is ready to accept traffic. These endpoints should be considered safe for load balancers and clients to utilize. Can be repeated multiple times. -* `not_ready_address` - (Optional) A IP address block which offers the related ports but is not currently marked as ready because it have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. Can be repeated multiple times. -* `port` - (Optional) A port number block available on the related IP addresses. Can be repeated multiple times. - -### `address` - -#### Attributes - -* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). -* `hostname` - (Optional) The Hostname of this endpoint. -* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node. - -### `not_ready_address` - -#### Attributes - -* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). -* `hostname` - (Optional) The Hostname of this endpoint. -* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node. - -### `port` - -#### Arguments - -* `name` - (Optional) The name of this port within the endpoint. All ports within the endpoint must have unique names. Optional if only one port is defined on this endpoint. -* `port` - (Required) The port that will be utilized by this endpoint. -* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. - ## Import An Endpoints resource can be imported using its namespace and name, e.g. diff --git a/templates/resources/env.md.tmpl b/templates/resources/env.md.tmpl index 74e683a961..f214a05d1a 100644 --- a/templates/resources/env.md.tmpl +++ b/templates/resources/env.md.tmpl @@ -5,88 +5,16 @@ description: |- This resource provides a way to manage environment variables in resources that were created outside of Terraform. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_env - -This resource provides a way to manage environment variables in resources that were created outside of Terraform. This resource provides functionality similar to the `kubectl set env` command. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/env/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `api_version` - (Required) The apiVersion of the resource to add environment variables to. -* `kind` - (Required) The kind of the resource to add environment variables to. -* `metadata` - (Required) Standard metadata of the resource to add environment variables to. -* `container` - (Optional) Name of the container for which we are updating the environment variables. -* `init_container` - (Optional) Name of the initContainer for which we are updating the environment variables. -* `env` - (Required) Value block with custom values used to represent environment variables -* `force` - (Optional) Force management of environment variables if there is a conflict. -* `field_manager` - (Optional) The name of the [field manager](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management). Defaults to `Terraform`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `name` - (Required) Name of the resource to add environment variables to. -* `namespace` - (Optional) Namespace of the resource to add environment variables to. - -### `env` - -#### Arguments - -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value - -### `value_from` - -#### Arguments - -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. - -### `config_map_key_ref` - -#### Arguments - -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined - -### `field_ref` - -#### Arguments - -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version - -### `resource_field_ref` - -#### Arguments - -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". - -### `secret_key_ref` - -#### Arguments - -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined - ## Import This resource does not support the `import` command. As this resource operates on Kubernetes resources that already exist, creating the resource is equivalent to importing it. diff --git a/templates/resources/horizontal_pod_autoscaler.md.tmpl b/templates/resources/horizontal_pod_autoscaler.md.tmpl index ab693b0717..66f677b99d 100644 --- a/templates/resources/horizontal_pod_autoscaler.md.tmpl +++ b/templates/resources/horizontal_pod_autoscaler.md.tmpl @@ -5,13 +5,11 @@ description: |- Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_horizontal_pod_autoscaler - -Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. +{{ .SchemaMarkdown }} ## Example Usage @@ -33,146 +31,6 @@ If you wish to use `autoscaling/v1` use the `target_cpu_utilization_percentage` If you wish to use `autoscaling/v2beta2` then set one or more `metric` fields. -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard horizontal pod autoscaler's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Behaviour of the autoscaler. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this horizontal pod autoscaler. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `max_replicas` - (Required) Upper limit for the number of pods that can be set by the autoscaler. -* `min_replicas` - (Optional) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. -* `scale_target_ref` - (Required) Reference to scaled resource. e.g. Replication Controller -* `target_cpu_utilization_percentage` - (Optional) Target average CPU utilization (represented as a percentage of requested CPU) over all the pods. If not specified the default autoscaling policy will be used. -* `metric` - (Optional) A metric on which to scale. -* `behavior` - (Optional) Behavior configures the scaling behavior of the target in both Up and Down directions (scale_up and scale_down fields respectively) - -### `metric` - -#### Arguments - -* `type` - (Required) The type of metric. It can be one of "Object", "Pods", "Resource", or "External". -* `object` - (Optional) A metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). -* `pods` - (Optional) A metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. -* `resource` - (Optional) A resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. -* `external` - (Optional) A global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). - -### Metric Type: `external` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `object` - -#### Arguments - -* `described_object` - (Required) Reference to the object. -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `pods` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `resource` - -#### Arguments - -* `name` - (Required) Name of the resource in question. -* `target` - (Required) The target for the given metric. - -### `metric` - -#### Arguments - -* `name` - (Required) The name of the given metric -* `selector` - (Optional) The label selector for the given metric - -### `target` - -#### Arguments - -* `type` - (Required) Represents whether the metric type is Utilization, Value, or AverageValue. -* `average_value` - (Optional) The target value of the average of the metric across all relevant pods (as a quantity). -* `average_utilization` - (Optional) The target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type. -* `value` - (Optional) value is the target value of the metric (as a quantity). - -#### Quantities - -See [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for documentation on resource management for pods and containers. - -### `described_object` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `scale_target_ref` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `behavior` - -#### Arguments - -* `scale_up` - (Optional) Scaling policy for scaling Up -* `scale_down` - (Optional) Scaling policy for scaling Down - -### `scale_up` - -#### Arguments - -* `policy` - (Required) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. -* `select_policy` - (Optional) Used to specify which policy should be used. If not set, the default value Max is used. -* `stabilization_window_seconds` - (Optional) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). - -### `policy` - -#### Arguments - -* `period_seconds` - (Required) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). -* `type` - (Required) Type is used to specify the scaling policy: Percent or Pods -* `value` - (Required) Value contains the amount of change which is permitted by the policy. It must be greater than zero. - ## Import Horizontal Pod Autoscaler can be imported using the namespace and name, e.g. diff --git a/templates/resources/horizontal_pod_autoscaler_v1.md.tmpl b/templates/resources/horizontal_pod_autoscaler_v1.md.tmpl index 37034d0b5f..a1acace1d1 100644 --- a/templates/resources/horizontal_pod_autoscaler_v1.md.tmpl +++ b/templates/resources/horizontal_pod_autoscaler_v1.md.tmpl @@ -5,66 +5,16 @@ description: |- Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_horizontal_pod_autoscaler_v1 - -Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/horizontal_pod_autoscaler_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard horizontal pod autoscaler's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Behaviour of the autoscaler. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this horizontal pod autoscaler. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `max_replicas` - (Required) Upper limit for the number of pods that can be set by the autoscaler. -* `min_replicas` - (Optional) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. -* `scale_target_ref` - (Required) Reference to scaled resource. e.g. Replication Controller -* `target_cpu_utilization_percentage` - (Optional) Target average CPU utilization (represented as a percentage of requested CPU) over all the pods. If not specified the default autoscaling policy will be used. - -### `scale_target_ref` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - ## Import Horizontal Pod Autoscaler can be imported using the namespace and name, e.g. diff --git a/templates/resources/horizontal_pod_autoscaler_v2.md.tmpl b/templates/resources/horizontal_pod_autoscaler_v2.md.tmpl index c6ea52a11f..9b0e99a0aa 100644 --- a/templates/resources/horizontal_pod_autoscaler_v2.md.tmpl +++ b/templates/resources/horizontal_pod_autoscaler_v2.md.tmpl @@ -5,13 +5,11 @@ description: |- Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_horizontal_pod_autoscaler_v2 - -Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. +{{ .SchemaMarkdown }} ## Example Usage, with `metric` @@ -21,154 +19,6 @@ Horizontal Pod Autoscaler automatically scales the number of pods in a replicati {{tffile "examples/resources/horizontal_pod_autoscaler_v2/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard horizontal pod autoscaler's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Behaviour of the autoscaler. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this horizontal pod autoscaler. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `max_replicas` - (Required) Upper limit for the number of pods that can be set by the autoscaler. -* `min_replicas` - (Optional) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. -* `scale_target_ref` - (Required) Reference to scaled resource. e.g. Replication Controller -* `metric` - (Optional) A metric on which to scale. -* `behavior` - (Optional) Behavior configures the scaling behavior of the target in both Up and Down directions (`scale_up` and `scale_down` fields respectively) - -### `metric` - -#### Arguments - -* `type` - (Required) The type of metric. It can be one of "Object", "Pods", "Resource", "External", or "ContainerResource". -* `object` - (Optional) A metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). -* `pods` - (Optional) A metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. -* `resource` - (Optional) A resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. -* `external` - (Optional) A global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). -* `container_resource` - (Optional) A resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. - -### Metric Type: `container_resource` - -#### Arguments - -* `container` - (Required) Name of the container in the pods of the scaling target. -* `name` - (Required) Name of the resource in question. -* `target` - (Required) The target for the given metric. - -### Metric Type: `external` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `object` - -#### Arguments - -* `described_object` - (Required) Reference to the object. -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `pods` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `resource` - -#### Arguments - -* `name` - (Required) Name of the resource in question. -* `target` - (Required) The target for the given metric. - -### `metric` - -#### Arguments - -* `name` - (Required) The name of the given metric -* `selector` - (Optional) The label selector for the given metric - -### `target` - -#### Arguments - -* `type` - (Required) Represents whether the metric type is Utilization, Value, or AverageValue. -* `average_value` - (Optional) The target value of the average of the metric across all relevant pods (as a quantity). -* `average_utilization` - (Optional) The target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type. -* `value` - (Optional) value is the target value of the metric (as a quantity). - -#### Quantities - -See [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for documentation on resource management for pods and containers. - -### `described_object` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `scale_target_ref` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `behavior` - -#### Arguments - -* `scale_up` - (Optional) Scaling policy for scaling Up -* `scale_down` - (Optional) Scaling policy for scaling Down - -### `scale_up` - -#### Arguments - -* `policy` - (Required) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. -* `select_policy` - (Optional) Used to specify which policy should be used. If not set, the default value Max is used. -* `stabilization_window_seconds` - (Optional) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). - -### `policy` - -#### Arguments - -* `period_seconds` - (Required) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). -* `type` - (Required) Type is used to specify the scaling policy: Percent or Pods -* `value` - (Required) Value contains the amount of change which is permitted by the policy. It must be greater than zero. - ## Import Horizontal Pod Autoscaler can be imported using the namespace and name, e.g. diff --git a/templates/resources/horizontal_pod_autoscaler_v2beta2.md.tmpl b/templates/resources/horizontal_pod_autoscaler_v2beta2.md.tmpl index 4617da861d..e96ee0abeb 100644 --- a/templates/resources/horizontal_pod_autoscaler_v2beta2.md.tmpl +++ b/templates/resources/horizontal_pod_autoscaler_v2beta2.md.tmpl @@ -5,13 +5,11 @@ description: |- Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_horizontal_pod_autoscaler_v2beta2 - -Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization. +{{ .SchemaMarkdown }} ## Example Usage, with `metric` @@ -21,154 +19,6 @@ Horizontal Pod Autoscaler automatically scales the number of pods in a replicati {{tffile "examples/resources/horizontal_pod_autoscaler_v2beta2/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard horizontal pod autoscaler's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Behaviour of the autoscaler. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the horizontal pod autoscaler that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the horizontal pod autoscaler. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the horizontal pod autoscaler, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the horizontal pod autoscaler must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this horizontal pod autoscaler that can be used by clients to determine when horizontal pod autoscaler has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this horizontal pod autoscaler. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `max_replicas` - (Required) Upper limit for the number of pods that can be set by the autoscaler. -* `min_replicas` - (Optional) Lower limit for the number of pods that can be set by the autoscaler, defaults to `1`. -* `scale_target_ref` - (Required) Reference to scaled resource. e.g. Replication Controller -* `metric` - (Optional) A metric on which to scale. -* `behavior` - (Optional) Behavior configures the scaling behavior of the target in both Up and Down directions (`scale_up` and `scale_down` fields respectively) - -### `metric` - -#### Arguments - -* `type` - (Required) The type of metric. It can be one of "Object", "Pods", "Resource", "External", or "ContainerResource". -* `object` - (Optional) A metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). -* `pods` - (Optional) A metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. -* `resource` - (Optional) A resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. -* `external` - (Optional) A global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). -* `container_resource` - (Optional) A resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. - -### Metric Type: `container_resource` - -#### Arguments - -* `container` - (Required) Name of the container in the pods of the scaling target. -* `name` - (Required) Name of the resource in question. -* `target` - (Required) The target for the given metric. - -### Metric Type: `external` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `object` - -#### Arguments - -* `described_object` - (Required) Reference to the object. -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `pods` - -#### Arguments - -* `metric` - (Required) Identifies the target by name and selector. -* `target` - (Required) The target for the given metric. - -### Metric Type: `resource` - -#### Arguments - -* `name` - (Required) Name of the resource in question. -* `target` - (Required) The target for the given metric. - -### `metric` - -#### Arguments - -* `name` - (Required) The name of the given metric -* `selector` - (Optional) The label selector for the given metric - -### `target` - -#### Arguments - -* `type` - (Required) Represents whether the metric type is Utilization, Value, or AverageValue. -* `average_value` - (Optional) The target value of the average of the metric across all relevant pods (as a quantity). -* `average_utilization` - (Optional) The target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type. -* `value` - (Optional) value is the target value of the metric (as a quantity). - -#### Quantities - -See [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for documentation on resource management for pods and containers. - -### `described_object` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `scale_target_ref` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. This argument is optional for the `v1` API version referents and mandatory for the rest. -* `kind` - (Required) Kind of the referent. e.g. `ReplicationController`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds) -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `behavior` - -#### Arguments - -* `scale_up` - (Optional) Scaling policy for scaling Up -* `scale_down` - (Optional) Scaling policy for scaling Down - -### `scale_up` - -#### Arguments - -* `policy` - (Required) List of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the scaling rule will be discarded as invalid. -* `select_policy` - (Optional) Used to specify which policy should be used. If not set, the default value Max is used. -* `stabilization_window_seconds` - (Optional) Number of seconds for which past recommendations should be considered while scaling up or scaling down. This value must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). - -### `policy` - -#### Arguments - -* `period_seconds` - (Required) Period specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). -* `type` - (Required) Type is used to specify the scaling policy: Percent or Pods -* `value` - (Required) Value contains the amount of change which is permitted by the policy. It must be greater than zero. - ## Import Horizontal Pod Autoscaler can be imported using the namespace and name, e.g. diff --git a/templates/resources/ingress.md.tmpl b/templates/resources/ingress.md.tmpl index c2432fec84..527a58dcd3 100644 --- a/templates/resources/ingress.md.tmpl +++ b/templates/resources/ingress.md.tmpl @@ -5,14 +5,12 @@ description: |- Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_ingress +# {{ .Name }} Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/ingress/example_1.tf"}} @@ -21,96 +19,6 @@ Ingress is a collection of rules that allow inbound connections to reach the end {{tffile "examples/resources/ingress/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard ingress's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Spec defines the behavior of a ingress. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `false`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the ingress that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `backend` - (Optional) Backend defines the referenced service endpoint to which the traffic will be forwarded. See `backend` block attributes below. -* `rule` - (Optional) A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. See `rule` block attributes below. -* `tls` - (Optional) TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. See `tls` block attributes below. -* `ingress_class_name` - (Optional) The ingress class name references an IngressClass resource that contains additional configuration including the name of the controller that should implement the class. - -### `backend` - -#### Arguments - -* `service_name` - (Optional) Specifies the name of the referenced service. -* `service_port` - (Optional) Specifies the port of the referenced service. - -### `rule` - -#### Arguments - -* `host` - (Optional) Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the IP in the Spec of the parent Ingress. 2. The : delimiter is not respected because ports are not allowed. Currently the port of an Ingress is implicitly :80 for http and :443 for https. Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue. -* `http` - (Required) http is a list of http selectors pointing to backends. In the example: http:///? -> backend where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'. See `http` block attributes below. - -#### `http` - -* `path` - (Required) Path array of path regex associated with a backend. Incoming urls matching the path are forwarded to the backend, see below for `path` block structure. - -#### `path` - -* `path` - (Required) A string or an extended POSIX regular expression as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. -* `backend` - (Required) Backend defines the referenced service endpoint to which the traffic will be forwarded to. - -### `tls` - -#### Arguments - -* `hosts` - (Optional) Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified. -* `secret_name` - (Optional) SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing. - -## Attributes - -### `status` - -* `status` - Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -#### `load_balancer` - -* LoadBalancer contains the current status of the load-balancer, if one is present. - -##### `ingress` - -* `ingress` - Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - -###### Attributes - -* `ip` - IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers). -* `hostname` - Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers). - ## Import Ingress can be imported using its namespace and name: diff --git a/templates/resources/ingress_class.md.tmpl b/templates/resources/ingress_class.md.tmpl index 0c08798f59..dd4cbac2d8 100644 --- a/templates/resources/ingress_class.md.tmpl +++ b/templates/resources/ingress_class.md.tmpl @@ -5,66 +5,16 @@ description: |- Ingresses can be implemented by different controllers, often with different configuration. Each Ingress should specify a class, a reference to an IngressClass resource that contains additional configuration including the name of the controller that should implement the class. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_ingress_class +# {{ .Name }} Ingresses can be implemented by different controllers, often with different configuration. Each Ingress should specify a class, a reference to an IngressClass resource that contains additional configuration including the name of the controller that should implement the class. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/ingress_class/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard ingress's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Spec defines the behavior of a ingress. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `false`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the ingress that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the ingress class, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `controller` - (Required) the name of the controller that should handle this class. -* `parameters` - (Optional) Parameters is a link to a custom resource containing additional configuration for the controller. See `parameters` block attributes below. - -### `parameters` - -#### Arguments - -* `name` - (Required) The name of resource being referenced. -* `kind` - (Required) The type of resource being referenced. -* `api_group` - (Optional) The group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. -* `scope` - (Optional) Refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. -* `namespace` - (Optional) The namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". - ## Import Ingress Classes can be imported using its name, e.g: diff --git a/templates/resources/ingress_class_v1.md.tmpl b/templates/resources/ingress_class_v1.md.tmpl index 8411dbf669..c6369e5eff 100644 --- a/templates/resources/ingress_class_v1.md.tmpl +++ b/templates/resources/ingress_class_v1.md.tmpl @@ -5,66 +5,16 @@ description: |- Ingresses can be implemented by different controllers, often with different configuration. Each Ingress should specify a class, a reference to an IngressClass resource that contains additional configuration including the name of the controller that should implement the class. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_ingress_class_v1 - -Ingresses can be implemented by different controllers, often with different configuration. Each Ingress should specify a class, a reference to an IngressClass resource that contains additional configuration including the name of the controller that should implement the class. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/ingress_class_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard ingress's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Spec defines the behavior of a ingress. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `false`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the ingress that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the ingress class, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `controller` - (Required) the name of the controller that should handle this class. -* `parameters` - (Optional) Parameters is a link to a custom resource containing additional configuration for the controller. See `parameters` block attributes below. - -### `parameters` - -#### Arguments - -* `name` - (Required) The name of resource being referenced. -* `kind` - (Required) The type of resource being referenced. -* `api_group` - (Optional) The group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. -* `scope` - (Optional) Refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. -* `namespace` - (Optional) The namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". - ## Import Ingress Classes can be imported using its name, e.g: diff --git a/templates/resources/ingress_v1.md.tmpl b/templates/resources/ingress_v1.md.tmpl index 3f538c1519..bfe669210c 100644 --- a/templates/resources/ingress_v1.md.tmpl +++ b/templates/resources/ingress_v1.md.tmpl @@ -5,13 +5,11 @@ description: |- Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_ingress_v1 - -Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. +{{ .SchemaMarkdown }} ## Example Usage @@ -21,118 +19,6 @@ Ingress is a collection of rules that allow inbound connections to reach the end {{tffile "examples/resources/ingress_v1/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard ingress's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Spec defines the behavior of a ingress. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `false`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the ingress that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `default_backend` - (Optional) DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller. See `backend` block attributes below. -* `rule` - (Optional) A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. See `rule` block attributes below. -* `tls` - (Optional) TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. See `tls` block attributes below. -* `ingress_class_name` - (Optional) The ingress class name references an IngressClass resource that contains additional configuration including the name of the controller that should implement the class. - -### `backend` - -#### Arguments - -* `resource` - (Optional) Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a `service.name` and `service.port` must not be specified. -* `service` - (Optional) Service references a Service as a Backend. - -### `service` - -#### Arguments - -* `name` - (Optional) Specifies the name of the referenced service. -* `port` - (Optional) Specifies the port of the referenced service. - -### `port` - -* `name` - (Optional) Name is the name of the port on the Service. -* `number` - (Optional) Number is the numerical port number (e.g. 80) on the Service. - -#### Arguments - -### `rule` - -#### Arguments - -* `host` - (Optional) Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the IP in the Spec of the parent Ingress. 2. The : delimiter is not respected because ports are not allowed. Currently the port of an Ingress is implicitly :80 for http and :443 for https. Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue. -* `http` - (Optional) http is a list of http selectors pointing to backends. In the example: http:///? -> backend where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'. See `http` block attributes below. - -#### `http` - -* `path` - (Required) Path array of path regex associated with a backend. Incoming urls matching the path are forwarded to the backend, see below for `path` block structure. - -#### `path` - -* `path` - (Required) A string or an extended POSIX regular expression as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. -* `path_type` - (Optional) PathType determines the interpretation of the Path matching. PathType can be one of the following values: `ImplementationSpecific`, `Exact`, or `Prefix`. See the [Kubernetes Ingress documentation](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types) for details. -* `backend` - (Required) Backend defines the referenced service endpoint to which the traffic will be forwarded to. - -### `tls` - -#### Arguments - -* `hosts` - (Optional) Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified. -* `secret_name` - (Optional) SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing. - -## Attributes - -### `status` - -* `status` - Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -#### `load_balancer` - -* LoadBalancer contains the current status of the load-balancer, if one is present. - -##### `ingress` - -* `ingress` - Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - -###### Attributes - -* `ip` - IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers). -* `hostname` - Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers). - -## Timeouts - -The following [Timeout](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts) configuration options are available for the `kubernetes_ingress_v1` resource: - -* `create` - ingress load balancer creation timeout (default `20 minutes`). -* `delete` - ingress load balancer deletion timeout (default `20 minutes`). - ## Import Ingress can be imported using its namespace and name: diff --git a/templates/resources/job.md.tmpl b/templates/resources/job.md.tmpl index d29f8e024b..895dd1d9de 100644 --- a/templates/resources/job.md.tmpl +++ b/templates/resources/job.md.tmpl @@ -5,11 +5,7 @@ description: |- A Job creates one or more Pods and ensures that a specified number of them successfully terminate. You can also use a Job to run multiple Pods in parallel. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_job +# {{ .Name }} A Job creates one or more Pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. @@ -17,6 +13,8 @@ A simple case is to create one Job object in order to reliably run one Pod to co You can also use a Job to run multiple Pods in parallel. +{{ .SchemaMarkdown }} + ## Example Usage - No waiting {{tffile "examples/resources/job/example_1.tf"}} @@ -25,104 +23,6 @@ You can also use a Job to run multiple Pods in parallel. {{tffile "examples/resources/job/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Specification of the desired behavior of a job. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_completion` - (Optional) If `true` blocks job `create` or `update` until the status of the job has a `Complete` or `Failed` condition. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `active_deadline_seconds` - (Optional) Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. -* `backoff_limit` - (Optional) Specifies the number of retries before marking this job failed. Defaults to 6 -* `completions` - (Optional) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `completion_mode` - (Optional) Specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/job/#completion-mode). -* `pod_failure_policy` - (Optional) Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure. -* `manual_selector` - (Optional) Controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector -* `parallelism` - (Optional) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when `((.spec.completions - .status.successful) < .spec.parallelism)`, i.e. when the work left to do is less than max parallelism. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `selector` - (Optional) A label query over pods that should match the pod count. Normally, the system sets this field for you. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors -* `template` - (Optional) Describes the pod that will be created when executing a job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `ttl_seconds_after_finished` - (Optional) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. - -### `pod_failure_policy` - -#### Arguments - -* `rule` - (Required) A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. - -### `rule` - -#### Arguments - -* `action` - (Optional) Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. -* `on_exit_codes` - (Optional) Represents the requirement on the container exit codes. -* `on_pod_condition` - (Optional) Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. - -### `on_exit_codes` - -#### Arguments - -* `container_name` - (Optional) Restricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template. -* `operator` - (Optional) Represents the relationship between the container exit code(s) and the specified values. -* `values` - (Required) Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. - -### `on_pod_condition` - -#### Arguments - -* `status` - (Optional) Specifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True. -* `type` - (Optional) Specifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type. - -### `selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. - -### `template` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/language/resources/syntax.html#operation-timeouts) configuration options are available for the `kubernetes_job` resource when used with `wait_for_completion = true`: - -* `create` - (Default `1m`) Used for creating a new job and waiting for a successful job completion. -* `update` - (Default `1m`) Used for updating an existing job and waiting for a successful job completion. - Note: - Kubernetes provider will treat update operations that change the Job spec resulting in the job re-run as "# forces replacement". In such cases, the `create` timeout value is used for both Create and Update operations. diff --git a/templates/resources/job_v1.md.tmpl b/templates/resources/job_v1.md.tmpl index 14265e5bba..64cda1386b 100644 --- a/templates/resources/job_v1.md.tmpl +++ b/templates/resources/job_v1.md.tmpl @@ -5,17 +5,11 @@ description: |- A Job creates one or more Pods and ensures that a specified number of them successfully terminate. You can also use a Job to run multiple Pods in parallel. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_job_v1 - -A Job creates one or more Pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. - -A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot. - -You can also use a Job to run multiple Pods in parallel. +{{ .SchemaMarkdown }} ## Example Usage - No waiting @@ -25,104 +19,6 @@ You can also use a Job to run multiple Pods in parallel. {{tffile "examples/resources/job_v1/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource's metadata. For more info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -* `spec` - (Required) Specification of the desired behavior of a job. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `wait_for_completion` - (Optional) If `true` blocks job `create` or `update` until the status of the job has a `Complete` or `Failed` condition. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `active_deadline_seconds` - (Optional) Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. -* `backoff_limit` - (Optional) Specifies the number of retries before marking this job failed. Defaults to 6 -* `completions` - (Optional) Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `completion_mode` - (Optional) Specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/job/#completion-mode). -* `manual_selector` - (Optional) Controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector -* `pod_failure_policy` - (Optional) Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure. -* `parallelism` - (Optional) Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when `((.spec.completions - .status.successful) < .spec.parallelism)`, i.e. when the work left to do is less than max parallelism. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `selector` - (Optional) A label query over pods that should match the pod count. Normally, the system sets this field for you. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors -* `template` - (Optional) Describes the pod that will be created when executing a job. For more info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ -* `ttl_seconds_after_finished` - (Optional) ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. - -### `pod_failure_policy` - -#### Arguments - -* `rule` - (Required) A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. - -### `rule` - -#### Arguments - -* `action` - (Optional) Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. -* `on_exit_codes` - (Optional) Represents the requirement on the container exit codes. -* `on_pod_condition` - (Optional) Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. - -### `on_exit_codes` - -#### Arguments - -* `container_name` - (Optional) Restricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template. -* `operator` - (Optional) Represents the relationship between the container exit code(s) and the specified values. -* `values` - (Required) Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. - -### `on_pod_condition` - -#### Arguments - -* `status` - (Optional) Specifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True. -* `type` - (Optional) Specifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type. - -### `selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) 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. - -### `template` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/language/resources/syntax.html#operation-timeouts) configuration options are available for the `kubernetes_job_v1` resource when used with `wait_for_completion = true`: - -* `create` - (Default `1m`) Used for creating a new job and waiting for a successful job completion. -* `update` - (Default `1m`) Used for updating an existing job and waiting for a successful job completion. - Note: - Kubernetes provider will treat update operations that change the Job spec resulting in the job re-run as "# forces replacement". In such cases, the `create` timeout value is used for both Create and Update operations. diff --git a/templates/resources/labels.md.tmpl b/templates/resources/labels.md.tmpl index d9d7abdb88..75b240f08e 100644 --- a/templates/resources/labels.md.tmpl +++ b/templates/resources/labels.md.tmpl @@ -5,38 +5,16 @@ description: |- This resource allows Terraform to manage the labels for a resource that already exists --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_labels - -This resource allows Terraform to manage the labels for a resource that already exists. This resource uses [field management](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) to manage only the labels that are defined in the Terraform configuration. Existing labels not specified in the configuration will be ignored. If a label specified in the config and is already managed by another client it will cause a conflict which can be overridden by setting `force` to true. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/labels/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `api_version` - (Required) The apiVersion of the resource to be labelled. -* `kind` - (Required) The kind of the resource to be labelled. -* `metadata` - (Required) Standard metadata of the resource to be labelled. -* `labels` - (Required) A map of labels to apply to the resource. -* `force` - (Optional) Force management of labels if there is a conflict. -* `field_manager` - (Optional) The name of the [field manager](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management). Defaults to `Terraform`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `name` - (Required) Name of the resource to be labelled. -* `namespace` - (Optional) Namespace of the resource to be labelled. - ## Import This resource does not support the `import` command. As this resource operates on Kubernetes resources that already exist, creating the resource is equivalent to importing it. diff --git a/templates/resources/limit_range.md.tmpl b/templates/resources/limit_range.md.tmpl index c4f337e621..a5c5e27bbc 100644 --- a/templates/resources/limit_range.md.tmpl +++ b/templates/resources/limit_range.md.tmpl @@ -5,68 +5,18 @@ description: |- Limit Range sets resource usage limits (e.g. memory, cpu, storage) for supported kinds of resources in a namespace. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_limit_range +# {{ .Name }} Limit Range sets resource usage limits (e.g. memory, cpu, storage) for supported kinds of resources in a namespace. Read more in [the official docs](https://kubernetes.io/docs/concepts/policy/limit-range/). +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/limit_range/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard limit range's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Optional) Spec defines the limits enforced. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `spec` - -#### Arguments - -* `limit` - (Optional) The list of limits that are enforced. - -### `limit` - -#### Arguments - -* `default` - (Optional) Default resource requirement limit value by resource name if resource limit is omitted. -* `default_request` - (Optional) The default resource requirement request value by resource name if resource request is omitted. -* `max` - (Optional) Max usage constraints on this kind by resource name. -* `max_limit_request_ratio` - (Optional) The named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. -* `min` - (Optional) Min usage constraints on this kind by resource name. -* `type` - (Optional) Type of resource that this limit applies to. e.g. `Pod`, `Container` or `PersistentVolumeClaim` - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the limit range that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the limit range. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the limit range, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the limit range must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this limit range that can be used by clients to determine when limit range has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this limit range. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import Limit Range can be imported using its namespace and name, e.g. diff --git a/templates/resources/limit_range_v1.md.tmpl b/templates/resources/limit_range_v1.md.tmpl index 8776eea238..2665b6a67a 100644 --- a/templates/resources/limit_range_v1.md.tmpl +++ b/templates/resources/limit_range_v1.md.tmpl @@ -5,68 +5,16 @@ description: |- Limit Range sets resource usage limits (e.g. memory, cpu, storage) for supported kinds of resources in a namespace. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_limit_range_v1 - -Limit Range sets resource usage limits (e.g. memory, cpu, storage) for supported kinds of resources in a namespace. - -Read more in [the official docs](https://kubernetes.io/docs/concepts/policy/limit-range/). +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/limit_range_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard limit range's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Optional) Spec defines the limits enforced. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `spec` - -#### Arguments - -* `limit` - (Optional) The list of limits that are enforced. - -### `limit` - -#### Arguments - -* `default` - (Optional) Default resource requirement limit value by resource name if resource limit is omitted. -* `default_request` - (Optional) The default resource requirement request value by resource name if resource request is omitted. -* `max` - (Optional) Max usage constraints on this kind by resource name. -* `max_limit_request_ratio` - (Optional) The named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. -* `min` - (Optional) Min usage constraints on this kind by resource name. -* `type` - (Optional) Type of resource that this limit applies to. e.g. `Pod`, `Container` or `PersistentVolumeClaim` - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the limit range that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the limit range. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the limit range, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the limit range must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this limit range that can be used by clients to determine when limit range has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this limit range. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import Limit Range can be imported using its namespace and name, e.g. diff --git a/templates/resources/manifest.md.tmpl b/templates/resources/manifest.md.tmpl index e4c4a93f27..be81f49967 100644 --- a/templates/resources/manifest.md.tmpl +++ b/templates/resources/manifest.md.tmpl @@ -5,11 +5,7 @@ description: |- The resource provides a way to create and manage custom resources --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_manifest +# {{ .Name }} Represents one Kubernetes resource by supplying a `manifest` attribute. The manifest value is the HCL representation of a Kubernetes YAML manifest. To convert an existing manifest from YAML to HCL, you can use the Terraform built-in function [`yamldecode()`](https://www.terraform.io/docs/configuration/functions/yamldecode.html) or [tfk8s](https://github.com/jrhouston/tfk8s). @@ -17,6 +13,8 @@ Once applied, the `object` attribute contains the state of the resource as retur ~> A minimum Terraform version of 0.14.8 is required to use this resource. +{{ .SchemaMarkdown }} + ### Before you use this resource - This resource requires API access during planning time. This means the cluster has to be accessible at plan time and thus cannot be created in the same apply operation. We recommend only using this resource for custom resources or resources not yet fully supported by the provider. @@ -95,25 +93,6 @@ resource "kubernetes_manifest" "test-ns" { The syntax for the field paths is the same as the one used in the `wait` block. -## Argument Reference - -The following arguments are supported: - -- `computed_fields` - (Optional) List of paths of fields to be handled as "computed". The user-configured value for the field will be overridden by any different value returned by the API after apply. -- `manifest` (Required) An object Kubernetes manifest describing the desired state of the resource in HCL format. -- `object` (Optional) The resulting resource state, as returned by the API server after applying the desired state from `manifest`. -- `wait` (Optional) An object which allows you configure the provider to wait for specific fields to reach a desired value or certain conditions to be met. See below for schema. -- `wait_for` (Optional, Deprecated) An object which allows you configure the provider to wait for certain conditions to be met. See below for schema. **DEPRECATED: use `wait` block**. -- `field_manager` (Optional) Configure field manager options. See below. - -### `wait` - -#### Arguments - -- `rollout` (Optional) When set to `true` will wait for the resource to roll out, equivalent to `kubectl rollout status`. -- `condition` (Optional) A set of condition to wait for. You can specify multiple `condition` blocks and it will wait for all of them. -- `fields` (Optional) A map of field paths and a corresponding regular expression with a pattern to wait for. The provider will wait until the field's value matches the regular expression. Use `*` for any value. - A field path is a string that describes the fully qualified address of a field within the resource, including its parent fields all the way up to "object". The syntax of a path string follows the rules below: - Fields of objects are addressed with `.` @@ -136,20 +115,3 @@ A field path is a string that describes the fully qualified address of a field w > type(kubernetes_manifest.my-secret.object.data) map(string) ``` - -### `wait_for` (deprecated, use `wait`) - -#### Arguments - -- `fields` (Optional) A map of fields and a corresponding regular expression with a pattern to wait for. The provider will wait until the field matches the regular expression. Use `*` for any value. - -### `field_manager` - -#### Arguments - -- `name` (Optional) The name of the field manager to use when applying the resource. Defaults to `Terraform`. -- `force_conflicts` (Optional) Forcibly override any field manager conflicts when applying the resource. Defaults to `false`. - -### `timeouts` - -See [Operation Timeouts](https://www.terraform.io/docs/language/resources/syntax.html#operation-timeouts) diff --git a/templates/resources/mutating_webhook_configuration.md.tmpl b/templates/resources/mutating_webhook_configuration.md.tmpl index e350e47a05..eed3aa2e14 100644 --- a/templates/resources/mutating_webhook_configuration.md.tmpl +++ b/templates/resources/mutating_webhook_configuration.md.tmpl @@ -5,13 +5,11 @@ description: |- Mutating Webhook Configuration configures a mutating admission webhook --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_mutating_webhook_configuration - -Mutating Webhook Configuration configures a [mutating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks). +{{ .SchemaMarkdown }} ## Example Usage @@ -21,81 +19,6 @@ Mutating Webhook Configuration configures a [mutating admission webhook](https:/ The provider supports clusters running either `v1` or `v1beta1` of the Admission Registration API. -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Mutating Webhook Configuration metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `webhook` - (Required) A list of webhooks and the affected resources and operations. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Mutating Webhook Configuration that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Mutating Webhook Configuration. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Mutating Webhook Configuration, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Mutating Webhook Configuration that can be used by clients to determine when Mutating Webhook Configuration has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Mutating Webhook Configuration. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `webhook` - -#### Arguments - -* `admission_review_versions` - (Optional) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list are supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. -* `client_config` - (Required) ClientConfig defines how to communicate with the hook. -* `failure_policy` - (Optional) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - Allowed values are "Ignore" or "Fail". Defaults to "Fail". -* `match_policy` - (Optional) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to "Equivalent" -* `name` - (Required) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. -* `namespace_selector` - (Optional) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator": "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "environment", "operator": "In", "values": [ "prod", "staging" ] } ] } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. Default to the empty LabelSelector, which matches everything. -* `object_selector` - (Optional) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. -* `reinvocation_policy` - (Optional) reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded". Never: the webhook will not be called more than once in a single admission evaluation. IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: *the number of additional invocations is not guaranteed to be exactly one.* if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. *webhooks that use this option may be reordered to minimize the number of additional invocations.* to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead. Defaults to "Never". -* `rule` - (Optional) Describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches *any* Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. -* `side_effects` - (Required) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. -* `timeout_seconds` - (Optional) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. - -### `client_config` - -#### Arguments - -* `ca_bundle` - (Optional) A PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. -* `service` - (Optional) A reference to the service for this webhook. Either `service` or `url` must be specified. If the webhook is running within the cluster, then you should use `service`. -* `url` - (Optional) Gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. - -~> Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be "https"; the URL must begin with "https://". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. - -### `service` - -#### Arguments - -* `name` - (Required) The name of the service. -* `namespace` - (Required) The namespace of the service. -* `path` - (Optional) The URL path which will be sent in any request to this service. -* `port` - (Optional) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). - -### `rule` - -#### Arguments - -* `api_groups` - (Required) The API groups the resources belong to. '\*' is all groups. If '\*' is present, the length of the list must be one. -* `api_versions` - (Required) The API versions the resources belong to. '\*' is all versions. If '\*' is present, the length of the list must be one. -* `operations` - (Required) The operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '\*' is present, the length of the list must be one. -* `resources` - (Required) A list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '\*' means all resources, but not subresources. 'pods/\*' means all subresources of pods. '\*/scale' means all scale subresources. '\*/\*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. -* `scope` - (Optional) Specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". - ## Import Mutating Webhook Configuration can be imported using the name, e.g. diff --git a/templates/resources/mutating_webhook_configuration_v1.md.tmpl b/templates/resources/mutating_webhook_configuration_v1.md.tmpl index 273010fe51..002085f6cb 100644 --- a/templates/resources/mutating_webhook_configuration_v1.md.tmpl +++ b/templates/resources/mutating_webhook_configuration_v1.md.tmpl @@ -5,13 +5,11 @@ description: |- Mutating Webhook Configuration configures a mutating admission webhook --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_mutating_webhook_configuration_v1 - -Mutating Webhook Configuration configures a [mutating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks). +{{ .SchemaMarkdown }} ## Example Usage @@ -21,81 +19,6 @@ Mutating Webhook Configuration configures a [mutating admission webhook](https:/ The provider supports clusters running either `v1` or `v1beta1` of the Admission Registration API. -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Mutating Webhook Configuration metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `webhook` - (Required) A list of webhooks and the affected resources and operations. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Mutating Webhook Configuration that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Mutating Webhook Configuration. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Mutating Webhook Configuration, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Mutating Webhook Configuration that can be used by clients to determine when Mutating Webhook Configuration has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Mutating Webhook Configuration. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `webhook` - -#### Arguments - -* `admission_review_versions` - (Optional) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list are supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. -* `client_config` - (Required) ClientConfig defines how to communicate with the hook. -* `failure_policy` - (Optional) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - Allowed values are "Ignore" or "Fail". Defaults to "Fail". -* `match_policy` - (Optional) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to "Equivalent" -* `name` - (Required) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. -* `namespace_selector` - (Optional) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator": "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "environment", "operator": "In", "values": [ "prod", "staging" ] } ] } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. Default to the empty LabelSelector, which matches everything. -* `object_selector` - (Optional) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. -* `reinvocation_policy` - (Optional) reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded". Never: the webhook will not be called more than once in a single admission evaluation. IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: *the number of additional invocations is not guaranteed to be exactly one.* if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. *webhooks that use this option may be reordered to minimize the number of additional invocations.* to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead. Defaults to "Never". -* `rule` - (Optional) Describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches *any* Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. -* `side_effects` - (Required) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. -* `timeout_seconds` - (Optional) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. - -### `client_config` - -#### Arguments - -* `ca_bundle` - (Optional) A PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. -* `service` - (Optional) A reference to the service for this webhook. Either `service` or `url` must be specified. If the webhook is running within the cluster, then you should use `service`. -* `url` - (Optional) Gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. - -~> Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be "https"; the URL must begin with "https://". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. - -### `service` - -#### Arguments - -* `name` - (Required) The name of the service. -* `namespace` - (Required) The namespace of the service. -* `path` - (Optional) The URL path which will be sent in any request to this service. -* `port` - (Optional) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). - -### `rule` - -#### Arguments - -* `api_groups` - (Required) The API groups the resources belong to. '\*' is all groups. If '\*' is present, the length of the list must be one. -* `api_versions` - (Required) The API versions the resources belong to. '\*' is all versions. If '\*' is present, the length of the list must be one. -* `operations` - (Required) The operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '\*' is present, the length of the list must be one. -* `resources` - (Required) A list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '\*' means all resources, but not subresources. 'pods/\*' means all subresources of pods. '\*/scale' means all scale subresources. '\*/\*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. -* `scope` - (Optional) Specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". - ## Import Mutating Webhook Configuration can be imported using the name, e.g. diff --git a/templates/resources/namespace.md.tmpl b/templates/resources/namespace.md.tmpl index df578b3fc8..4b545b941c 100644 --- a/templates/resources/namespace.md.tmpl +++ b/templates/resources/namespace.md.tmpl @@ -5,57 +5,22 @@ description: |- Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_namespace +# {{ .Name }} Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces. Read more about namespaces at [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/). +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/namespace/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard namespace's [metadata](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - ### Timeouts `kubernetes_namespace` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - `delete` - Default `5 minutes` -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the namespace that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more about [name idempotency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency). -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) namespaces. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). - -* `name` - (Optional) Name of the namespace, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this namespace that can be used by clients to determine when namespaces have changed. Read more about [concurrency control and consistency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency). -* `uid` - The unique in time and space value for this namespace. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids). - -## Attribute Reference - -* `wait_for_default_service_account` - (Optional) When set to `true` Terraform will wait until the default service account has been asynchronously created by Kubernetes when creating the namespace resource. This has the equivalent effect of creating a `kubernetes_default_service_account` resource for dependent resources but allows a user to consume the "default" service account directly. The default behaviour (`false`) does not wait for the default service account to exist. - ## Import Namespaces can be imported using their name, e.g. diff --git a/templates/resources/namespace_v1.md.tmpl b/templates/resources/namespace_v1.md.tmpl index cc1d5143ab..b5650ab4b6 100644 --- a/templates/resources/namespace_v1.md.tmpl +++ b/templates/resources/namespace_v1.md.tmpl @@ -5,57 +5,22 @@ description: |- Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_namespace_v1 - -Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces. Read more about namespaces at [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/namespace_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard namespace's [metadata](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - ### Timeouts `kubernetes_namespace_v1` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - `delete` - Default `5 minutes` -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the namespace that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more about [name idempotency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency). -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) namespaces. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the namespace, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this namespace that can be used by clients to determine when namespaces have changed. Read more about [concurrency control and consistency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency). -* `uid` - The unique in time and space value for this namespace. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -## Attribute Reference - -* `wait_for_default_service_account` - (Optional) When set to `true` Terraform will wait until the default service account has been asynchronously created by Kubernetes when creating the namespace resource. This has the equivalent effect of creating a `kubernetes_default_service_account_v1` resource for dependent resources but allows a user to consume the "default" service account directly. The default behaviour (`false`) does not wait for the default service account to exist. - ## Import Namespaces can be imported using their name, e.g. diff --git a/templates/resources/network_policy.md.tmpl b/templates/resources/network_policy.md.tmpl index 5f356122f5..e440cb7eaf 100644 --- a/templates/resources/network_policy.md.tmpl +++ b/templates/resources/network_policy.md.tmpl @@ -6,125 +6,16 @@ description: |- NetworkPolicy resources use labels to select pods and define rules which specify what traffic is allowed to the selected pods. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_network_policy +# {{ .Name }} Kubernetes supports network policies to specify how groups of pods are allowed to communicate with each other and with other network endpoints. NetworkPolicy resources use labels to select pods and define rules which specify what traffic is allowed to the selected pods. Read more about network policies at https://kubernetes.io/docs/concepts/services-networking/network-policies/ +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/network_policy/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard network policy's [metadata](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the network policy that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more about [name idempotency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency). -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) network policies. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the network policy, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this network policy that can be used by clients to determine when network policies have changed. Read more about [concurrency control and consistency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency). -* `uid` - The unique in time and space value for this network policy. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `egress` - (Optional) List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this block is empty then this NetworkPolicy allows all outgoing traffic. If this block is omitted then this NetworkPolicy does not allow any outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). -* `ingress` - (Optional) List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this block is empty then this NetworkPolicy allows all incoming traffic. If this block is omitted then this NetworkPolicy does not allow any incoming traffic (and serves solely to ensure that the pods it selects are isolated by default). -* `pod_selector` - (Required) Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. -* `policy_types` (Required) List of rule types that the NetworkPolicy relates to. Valid options are `Ingress`, `Egress`, or `Ingress,Egress`. This field is beta-level in 1.8 **Note**: the native Kubernetes API allows not to specify the `policy_types` property with the following description: - - > If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). - - Leaving the `policy_types` property optional here would have prevented an `egress` rule added to a Network Policy initially created without any `egress` rule nor `policy_types` from working as expected. Indeed, the PolicyTypes would have stuck to Ingress server side as the default value is only computed server side on resource creation, not on updates. - -### `ingress` - -#### Arguments - -* `from` - (Optional) List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list. -* `ports` - (Optional) List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. - -### `egress` - -#### Arguments - -* `to` - (Optional) List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. -* `ports` - (Optional) List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. - -### `from` - -#### Arguments - -* `namespace_selector` - (Optional) Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. -* `pod_selector` - (Optional) This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - -### `ports` - -#### Arguments - -* `port` - (Optional) The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. -* `protocol` - (Optional) The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. - -### `to` - -#### Arguments - -* `ip_block` - (Optional) IPBlock defines policy on a particular IPBlock -* `namespace_selector` - (Optional) Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. -* `pod_selector` - (Optional) This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - -### `ip_block` - -#### Arguments - -* `cidr` - (Optional) CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" -* `except` - (Optional) Except is a slice of CIDRs that should not be included within an IP Block. Valid examples are "192.168.1.1/24". Except values will be rejected if they are outside the CIDR range. - -### `namespace_selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - -### `pod_selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - -### `match_expressions` - -#### Arguments - -* `key` - (Optional) The label key that the selector applies to. -* `operator` - (Optional) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. -* `values` - (Optional) 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. - ## Import Network policies can be imported using their identifier consisting of `/`, e.g.: diff --git a/templates/resources/network_policy_v1.md.tmpl b/templates/resources/network_policy_v1.md.tmpl index fa8ac3bf68..5174d1635b 100644 --- a/templates/resources/network_policy_v1.md.tmpl +++ b/templates/resources/network_policy_v1.md.tmpl @@ -6,125 +6,16 @@ description: |- NetworkPolicy resources use labels to select pods and define rules which specify what traffic is allowed to the selected pods. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_network_policy_v1 - -Kubernetes supports network policies to specify how groups of pods are allowed to communicate with each other and with other network endpoints. NetworkPolicy resources use labels to select pods and define rules which specify what traffic is allowed to the selected pods. Read more about network policies at https://kubernetes.io/docs/concepts/services-networking/network-policies/ +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/network_policy_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard network policy's [metadata](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the network policy that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more about [name idempotency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency). -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) network policies. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the network policy, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this network policy that can be used by clients to determine when network policies have changed. Read more about [concurrency control and consistency](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency). -* `uid` - The unique in time and space value for this network policy. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `egress` - (Optional) List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this block is empty then this NetworkPolicy allows all outgoing traffic. If this block is omitted then this NetworkPolicy does not allow any outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). -* `ingress` - (Optional) List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this block is empty then this NetworkPolicy allows all incoming traffic. If this block is omitted then this NetworkPolicy does not allow any incoming traffic (and serves solely to ensure that the pods it selects are isolated by default). -* `pod_selector` - (Required) Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. -* `policy_types` (Required) List of rule types that the NetworkPolicy relates to. Valid options are `Ingress`, `Egress`, or `Ingress,Egress`. This field is beta-level in 1.8 **Note**: the native Kubernetes API allows not to specify the `policy_types` property with the following description: - - > If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). - - Leaving the `policy_types` property optional here would have prevented an `egress` rule added to a Network Policy initially created without any `egress` rule nor `policy_types` from working as expected. Indeed, the PolicyTypes would have stuck to Ingress server side as the default value is only computed server side on resource creation, not on updates. - -### `ingress` - -#### Arguments - -* `from` - (Optional) List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list. -* `ports` - (Optional) List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. - -### `egress` - -#### Arguments - -* `to` - (Optional) List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. -* `ports` - (Optional) List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. - -### `from` - -#### Arguments - -* `namespace_selector` - (Optional) Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. -* `pod_selector` - (Optional) This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - -### `ports` - -#### Arguments - -* `port` - (Optional) The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. -* `protocol` - (Optional) The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. - -### `to` - -#### Arguments - -* `ip_block` - (Optional) IPBlock defines policy on a particular IPBlock -* `namespace_selector` - (Optional) Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. -* `pod_selector` - (Optional) This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - -### `ip_block` - -#### Arguments - -* `cidr` - (Optional) CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" -* `except` - (Optional) Except is a slice of CIDRs that should not be included within an IP Block. Valid examples are "192.168.1.1/24". Except values will be rejected if they are outside the CIDR range. - -### `namespace_selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - -### `pod_selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - -### `match_expressions` - -#### Arguments - -* `key` - (Optional) The label key that the selector applies to. -* `operator` - (Optional) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. -* `values` - (Optional) 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. - ## Import Network policies can be imported using their identifier consisting of `/`, e.g.: diff --git a/templates/resources/node_taint.md.tmpl b/templates/resources/node_taint.md.tmpl index 79773103ef..e800ea7b5c 100644 --- a/templates/resources/node_taint.md.tmpl +++ b/templates/resources/node_taint.md.tmpl @@ -5,43 +5,16 @@ description: |- A Node Taint is an anti-affinity rule allowing a Kubernetes node to repel a set of pods. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_node_taint - -[Node affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) is a property of Pods that attracts them to a set of [nodes](https://kubernetes.io/docs/concepts/architecture/nodes/) (either as a preference or a hard requirement). Taints are the opposite -- they allow a node to repel a set of pods. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/node_taint/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Metadata describing which Kubernetes node to apply the taint to. -* `field_manager` - (Optional) Set the name of the field manager for the node taint. -* `force` - (Optional) Force overwriting annotations that were created or edited outside of Terraform. -* `taint` - (Required) The taint configuration to apply to the node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/). - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `name` - (Required) The name of the node to apply the taint to - -### `taint` - -#### Arguments - -* `key` - (Required, Forces new resource) The key of this node taint. -* `value` - (Required) The value of this node taint. Can be empty string. -* `effect` - (Required, Forces new resource) The scheduling effect to apply with this taint. Must be one of: `NoSchedule`, `PreferNoSchedule`, `NoExecute`. - ## Import This resource does not support the `import` command. As this resource operates on Kubernetes resources that already exist, creating the resource is equivalent to importing it. diff --git a/templates/resources/persistent_volume.md.tmpl b/templates/resources/persistent_volume.md.tmpl index 0946a11b35..b7562a8103 100644 --- a/templates/resources/persistent_volume.md.tmpl +++ b/templates/resources/persistent_volume.md.tmpl @@ -5,14 +5,12 @@ description: |- A Persistent Volume (PV) is a piece of networked storage in the cluster that has been provisioned by an administrator. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_persistent_volume +# {{ .Name }} The resource provides a piece of networked storage in the cluster provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. Persistent Volumes have a lifecycle independent of any individual pod that uses the PV. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/persistent_volume/example_1.tf"}} @@ -21,283 +19,6 @@ The resource provides a piece of networked storage in the cluster provisioned by {{tffile "examples/resources/persistent_volume/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard persistent volume's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec of the persistent volume owned by the cluster. See below. - -## Nested Blocks - -### `spec` - -#### Arguments - -* `access_modes` - (Required) Contains all ways the volume can be mounted. Valid values are `ReadWriteOnce`, `ReadOnlyMany`, `ReadWriteMany`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) -* `capacity` - (Required) A description of the persistent volume's resources and capacity. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity) -* `node_affinity` - (Optional) NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume. -* `persistent_volume_reclaim_policy` - (Optional) What happens to a persistent volume when released from its claim. Valid options are Retain (default), Delete and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming) -* `persistent_volume_source` - (Required) The specification of a persistent volume. -* `storage_class_name` - (Optional) The name of the persistent volume's storage class. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class) -* `mount_options` - (Optional) A Kubernetes administrator can specify additional mount options for when a Persistent Volume is mounted on a node. - -~> Not all Persistent Volume types support mount options. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options) - -* `volume_mode` - (Optional) Defines if a volume is used with a formatted filesystem or to remain in raw block state. Possible values are `Block` and `Filesystem`. Default value is `Filesystem`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode) - -### `node_affinity` - -#### Arguments - -* `required` - (Optional) Required specifies hard node constraints that must be met. - -### `required` - -#### Arguments - -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. - -### `node_selector_term` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -### `match_expressions` and `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are `In`, `NotIn`, `Exists`, `DoesNotExist`. `Gt`, and `Lt`. -* `values` - (Optional) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. If the operator is `Gt` or `Lt`, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - -### `persistent_volume_source` - -#### Arguments - -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime. -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/tree/master/mysql-cinder-pd#mysql-installation-with-cinder-volume-plugin. -* `csi` - (Optional) CSI represents storage that is handled by an external CSI driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk). -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `local` - (Optional) Represents a local storage volume on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#local). -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs). -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime. -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine. - -### `aws_elastic_block_store` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) - -### `azure_disk` - -#### Arguments - -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage OR the resource ID of an Azure managed data disk if `kind` is `Managed`. -* `disk_name` - (Required) The Name of the data disk in the blob storage OR the name of an Azure managed data disk if `kind` is `Managed`. -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `kind` - (Optional) The type for the data disk. Expected values: `Shared`, `Dedicated`, `Managed`. Defaults to `Shared`. - -### `azure_file` - -#### Arguments - -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key. -* `secret_namespace` - (Optional) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is \"default\" namespace. -* `share_name` - (Required) Share Name - -### `ceph_fs` - -#### Arguments - -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. sFor more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. see [secret_ref](#secret_ref) for more details. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. - -### `cinder` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. - -### `csi` - -#### Arguments - -* `driver` - (Required) the name of the volume driver to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_handle` - (Required) A map that specifies static properties of a volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_attributes` - (Optional) Attributes of the volume to publish. -* `fs_type` - (Optional) Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. `ext4`, `xfs`, `ntfs`. -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to `true`. If omitted, the default is `false`. -* `controller_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -* `node_stage_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. see [secret_ref](#secret_ref) for more details. -* `node_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -* `controller_expand_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. see [secret_ref](#secret_ref) for more details. - -### `fc` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) - -### `flex_volume` - -#### Arguments - -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. see [secret_ref](#secret_ref) for more details. - -### `flocker` - -#### Arguments - -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset - -### `gce_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) - -### `glusterfs` - -#### Arguments - -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. - -### `host_path` - -#### Arguments - -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) - -### `iscsi` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). - -### `local` - -#### Arguments - -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#local) - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the persistent volume that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the persistent volume, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this persistent volume that can be used by clients to determine when persistent volume has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this persistent volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `nfs` - -#### Arguments - -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) - -### `photon_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk - -### `quobyte` - -#### Arguments - -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. - -### `rbd` - -#### Arguments - -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. see [secret_ref](#secret_ref) for more details. - -### `secret_ref` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) The Namespace of the referent secret. - -### `vsphere_volume` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk - ## Import Persistent Volume can be imported using its name, e.g. diff --git a/templates/resources/persistent_volume_claim.md.tmpl b/templates/resources/persistent_volume_claim.md.tmpl index 13189a3f23..ab46dfb9fd 100644 --- a/templates/resources/persistent_volume_claim.md.tmpl +++ b/templates/resources/persistent_volume_claim.md.tmpl @@ -5,84 +5,17 @@ description: |- This resource allows the user to request for and claim to a persistent volume. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_persistent_volume_claim +# {{ .Name }} This resource allows the user to request for and claim to a persistent volume. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/persistent_volume_claim/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard persistent volume claim's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the desired characteristics of a volume requested by a pod author. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) -* `wait_until_bound` - (Optional) Whether to wait for the claim to reach `Bound` state (to find volume in which to claim the space) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the persistent volume claim, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the persistent volume claim must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this persistent volume claim that can be used by clients to determine when persistent volume claim has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this persistent volume claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `access_modes` - (Required) A set of the desired access modes the volume should have. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes) -* `resources` - (Required) A list of the minimum resources the volume should have. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `selector` - (Optional) A label query over volumes to consider for binding. -* `volume_name` - (Optional) The binding reference to the PersistentVolume backing this claim. -* `storage_class_name` - (Optional) Name of the storage class requested by the claim. -* `volume_mode` - (Optional) Defines what type of volume is required by the claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode) - -### `match_expressions` - -#### Arguments - -* `key` - (Optional) The label key that the selector applies to. -* `operator` - (Optional) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. -* `values` - (Optional) 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. - -### `resources` - -#### Arguments - -* `limits` - (Optional) Map describing the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) - -### `selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - -## Import +##Import Persistent Volume Claim can be imported using its namespace and name, e.g. diff --git a/templates/resources/persistent_volume_claim_v1.md.tmpl b/templates/resources/persistent_volume_claim_v1.md.tmpl index acd834634f..531fa32609 100644 --- a/templates/resources/persistent_volume_claim_v1.md.tmpl +++ b/templates/resources/persistent_volume_claim_v1.md.tmpl @@ -5,83 +5,16 @@ description: |- This resource allows the user to request for and claim to a persistent volume. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_persistent_volume_claim_v1 - -This resource allows the user to request for and claim to a persistent volume. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/persistent_volume_claim_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard persistent volume claim's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the desired characteristics of a volume requested by a pod author. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) -* `wait_until_bound` - (Optional) Whether to wait for the claim to reach `Bound` state (to find volume in which to claim the space) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the persistent volume claim, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the persistent volume claim must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this persistent volume claim that can be used by clients to determine when persistent volume claim has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this persistent volume claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `access_modes` - (Required) A set of the desired access modes the volume should have. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes) -* `resources` - (Required) A list of the minimum resources the volume should have. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `selector` - (Optional) A label query over volumes to consider for binding. -* `volume_name` - (Optional) The binding reference to the PersistentVolume backing this claim. -* `storage_class_name` - (Optional) Name of the storage class requested by the claim. -* `volume_mode` - (Optional) Defines what type of volume is required by the claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode) - -### `match_expressions` - -#### Arguments - -* `key` - (Optional) The label key that the selector applies to. -* `operator` - (Optional) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`. -* `values` - (Optional) 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. - -### `resources` - -#### Arguments - -* `limits` - (Optional) Map describing the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) - -### `selector` - -#### Arguments - -* `match_expressions` - (Optional) A list of label selector requirements. The requirements are ANDed. -* `match_labels` - (Optional) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - ## Import Persistent Volume Claim can be imported using its namespace and name, e.g. diff --git a/templates/resources/persistent_volume_v1.md.tmpl b/templates/resources/persistent_volume_v1.md.tmpl index 9de551bf64..4bd19acdcd 100644 --- a/templates/resources/persistent_volume_v1.md.tmpl +++ b/templates/resources/persistent_volume_v1.md.tmpl @@ -5,13 +5,11 @@ description: |- A Persistent Volume (PV) is a piece of networked storage in the cluster that has been provisioned by an administrator. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_persistent_volume_v1 - -The resource provides a piece of networked storage in the cluster provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. Persistent Volumes have a lifecycle independent of any individual pod that uses the PV. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) +{{ .SchemaMarkdown }} ## Example Usage @@ -21,283 +19,6 @@ The resource provides a piece of networked storage in the cluster provisioned by {{tffile "examples/resources/persistent_volume_v1/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard persistent volume's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec of the persistent volume owned by the cluster. See below. - -## Nested Blocks - -### `spec` - -#### Arguments - -* `access_modes` - (Required) Contains all ways the volume can be mounted. Valid values are `ReadWriteOnce`, `ReadOnlyMany`, `ReadWriteMany`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) -* `capacity` - (Required) A description of the persistent volume's resources and capacity. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity) -* `node_affinity` - (Optional) NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume. -* `persistent_volume_reclaim_policy` - (Optional) What happens to a persistent volume when released from its claim. Valid options are Retain (default), Delete and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming) -* `persistent_volume_source` - (Required) The specification of a persistent volume. -* `storage_class_name` - (Optional) The name of the persistent volume's storage class. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class) -* `mount_options` - (Optional) A Kubernetes administrator can specify additional mount options for when a Persistent Volume is mounted on a node. - -~> Not all Persistent Volume types support mount options. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options) - -* `volume_mode` - (Optional) Defines if a volume is used with a formatted filesystem or to remain in raw block state. Possible values are `Block` and `Filesystem`. Default value is `Filesystem`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode) - -### `node_affinity` - -#### Arguments - -* `required` - (Optional) Required specifies hard node constraints that must be met. - -### `required` - -#### Arguments - -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. - -### `node_selector_term` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -### `match_expressions` and `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are `In`, `NotIn`, `Exists`, `DoesNotExist`. `Gt`, and `Lt`. -* `values` - (Optional) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. If the operator is `Gt` or `Lt`, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - -### `persistent_volume_source` - -#### Arguments - -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime. -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/tree/master/mysql-cinder-pd#mysql-installation-with-cinder-volume-plugin. -* `csi` - (Optional) CSI represents storage that is handled by an external CSI driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk). -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `local` - (Optional) Represents a local storage volume on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#local). -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs). -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime. -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine. - -### `aws_elastic_block_store` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) - -### `azure_disk` - -#### Arguments - -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage OR the resource ID of an Azure managed data disk if `kind` is `Managed`. -* `disk_name` - (Required) The Name of the data disk in the blob storage OR the name of an Azure managed data disk if `kind` is `Managed`. -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `kind` - (Optional) The type for the data disk. Expected values: `Shared`, `Dedicated`, `Managed`. Defaults to `Shared`. - -### `azure_file` - -#### Arguments - -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key. -* `secret_namespace` - (Optional) The namespace of the secret that contains Azure Storage Account Name and Key. For Kubernetes up to 1.18.x the default is the same as the Pod. For Kubernetes 1.19.x and later the default is \"default\" namespace. -* `share_name` - (Required) Share Name - -### `ceph_fs` - -#### Arguments - -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. sFor more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. see [secret_ref](#secret_ref) for more details. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. - -### `cinder` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. - -### `csi` - -#### Arguments - -* `driver` - (Required) the name of the volume driver to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_handle` - (Required) A map that specifies static properties of a volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_attributes` - (Optional) Attributes of the volume to publish. -* `fs_type` - (Optional) Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. `ext4`, `xfs`, `ntfs`. -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to `true`. If omitted, the default is `false`. -* `controller_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -* `node_stage_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. see [secret_ref](#secret_ref) for more details. -* `node_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. -* `controller_expand_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. see [secret_ref](#secret_ref) for more details. - -### `fc` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) - -### `flex_volume` - -#### Arguments - -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. see [secret_ref](#secret_ref) for more details. - -### `flocker` - -#### Arguments - -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset - -### `gce_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) - -### `glusterfs` - -#### Arguments - -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. - -### `host_path` - -#### Arguments - -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) - -### `iscsi` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). - -### `local` - -#### Arguments - -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#local) - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the persistent volume that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the persistent volume, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this persistent volume that can be used by clients to determine when persistent volume has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this persistent volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `nfs` - -#### Arguments - -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) - -### `photon_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk - -### `quobyte` - -#### Arguments - -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. - -### `rbd` - -#### Arguments - -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. see [secret_ref](#secret_ref) for more details. - -### `secret_ref` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) The Namespace of the referent secret. - -### `vsphere_volume` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk - ## Import Persistent Volume can be imported using its name, e.g. diff --git a/templates/resources/pod.md.tmpl b/templates/resources/pod.md.tmpl index e325a392f9..8283c9d040 100644 --- a/templates/resources/pod.md.tmpl +++ b/templates/resources/pod.md.tmpl @@ -5,16 +5,14 @@ description: |- A pod is a group of one or more containers, the shared storage for those containers, and options about how to run the containers. Pods are always co-located and co-scheduled, and run in a shared context. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_pod +# {{ .Name }} A pod is a group of one or more containers, the shared storage for those containers, and options about how to run the containers. Pods are always co-located and co-scheduled, and run in a shared context. Read more at [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod/) +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/pod/example_1.tf"}} @@ -27,818 +25,6 @@ terraform version of the [pods/pod-with-pod-affinity.yaml](https://raw.githubuse {{tffile "examples/resources/pod/example_3.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard pod's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec of the pod owned by the cluster -* `target_state` - (Optional) A list of the pod phases that indicate whether it was successfully created. Options: "Pending", "Running", "Succeeded", "Failed", "Unknown". Default: "Running". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase") - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the pod that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the pod. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the pod, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the pod must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this pod that can be used by clients to determine when pod has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true` for Pods. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `os` - (Optional) Specifies the OS of the containers in the pod. -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the formerer being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `scheduler_name` - (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `topology_spread_constraint` - (Optional) Describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) -* `readiness_gate` - (Optional) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True". [More info](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-readiness-gate) - -### `affinity` - -#### Arguments - -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) - -### `node_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` - -#### Arguments - -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. - -## `node_selector_term` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -### `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `preference` - (Required) A node selector term, associated with the corresponding weight. - -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - -### `preference` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -## `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `pod_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `pod_anti_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) - -#### Arguments - -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Optional) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. - -### `os` - -#### Arguments - -* `name` - (Required) Name is the name of the operating system. The currently supported values are `linux` and `windows`. - -### `container` - -#### Arguments - -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) Block(s) of [port](#port)s to expose on the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. May be used multiple times. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `termination_message_policy` - (Optional): Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. - -### `aws_elastic_block_store` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) - -### `azure_disk` - -#### Arguments - -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). - -### `azure_file` - -#### Arguments - -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name - -### `capabilities` - -#### Arguments - -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities - -### `ceph_fs` - -#### Arguments - -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. - -### `cinder` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. - -### `config_map` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `config_map_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined - -### `config_map_key_ref` - -#### Arguments - -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined - -### `csi` - -#### Arguments - -* `driver` - (Required) the name of the volume driver to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi). -* `volume_attributes` - (Optional) Attributes of the volume to publish. -* `fs_type` - (Optional) Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. `ext4`, `xfs`, `ntfs`. -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to `true`. If omitted, the default is `false`. -* `node_publish_secret_ref` - (Optional) A reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. see [secret_ref](#secret_ref) for more details. - -### `dns_config` - -#### Arguments - -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. - -The `option` block supports the following: - -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. - -### `downward_api` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. - -### `empty_dir` - -#### Arguments - -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). - -### `env` - -#### Arguments - -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value - -### `env_from` - -#### Arguments - -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from - -### `exec` - -#### Arguments - -* `command` - (Optional) 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. 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. - -### `fc` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) - -### `field_ref` - -#### Arguments - -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version - -### `flex_volume` - -#### Arguments - -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. - -### `flocker` - -#### Arguments - -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset - -### `gce_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) - -### `git_repo` - -#### Arguments - -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. - -### `glusterfs` - -#### Arguments - -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. - -### `grpc` - -#### Arguments - -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. - -### `host_aliases` - -#### Arguments - -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. - -### `host_path` - -#### Arguments - -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) - -### `http_get` - -#### Arguments - -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. - -### `http_header` - -#### Arguments - -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value - -### `image_pull_secrets` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `iscsi` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). - -### `items` - -#### Arguments - -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. - -### `lifecycle` - -#### Arguments - -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) - -### `liveness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `nfs` - -#### Arguments - -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) - -### `persistent_volume_claim` - -#### Arguments - -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. - -### `photon_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk - -### `port` - -#### Arguments - -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". - -### `post_start` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `pre_stop` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `quobyte` - -#### Arguments - -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. - -### `rbd` - -#### Arguments - -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. - -### `readiness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `resources` - -#### Arguments - -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. - -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. - -Please, look at the example below: - -{{tffile "examples/resources/pod/example_4.tf"}} - -### `resource_field_ref` - -#### Arguments - -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". - -### `seccomp_profile` - -#### Attributes - -* `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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. - -### `se_linux_options` - -#### Arguments - -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. - -### `secret` - -#### Arguments - -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) - -The `items` block supports the following: - -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. - -### `secret_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined - -### `secret_key_ref` - -#### Arguments - -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined - -### `secret_ref` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### container `security_context` - -#### Arguments - -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. -* `fs_group_change_policy` - 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. - -##### Sysctl - -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. - -### `capabilities` - -#### Arguments - -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. - -### pod `security_context` - -#### Arguments - -* `fs_group` - (Optional) 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. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. - -### `tcp_socket` - -#### Arguments - -* `port` - (Required) 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. - -### `toleration` - -#### Arguments - -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - -### `topology_spread_constraint` - -#### Arguments - -* `match_label_keys` - (Optional) Is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both `match_label_keys` and `label_selector`. `match_label_keys` cannot be set when `label_selector` isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against `label_selector`. -* `max_skew` - (Optional) Describes the degree to which pods may be unevenly distributed. Default value is `1`. -* `min_domains` - (Optional) Indicates a minimum number of eligible domains. Must be number greater than `0`. When set, `when_unsatisfiable` must be set to `DoNotSchedule`. -* `node_affinity_policy` - (Optional) Indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Valid values are `Honor` and `Ignore`. When unset, behavior defaults to `Honor`. -* `node_taints_policy` - (Optional) Indicates how we will treat node taints when calculating pod topology spread skew. Valid values are `Honor` and `Ignore`. When unset, behavior defaults to `Ignore`. -* `topology_key` - (Optional) The key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. -* `when_unsatisfiable` - (Optional) Indicates how to deal with a pod if it doesn't satisfy the spread constraint. Valid values are `DoNotSchedule` and `ScheduleAnyway`. Default value is `DoNotSchedule`. -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. - -### `value_from` - -#### Arguments - -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. - -### `projected` - -#### Arguments - -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources - -### `sources` - -#### Arguments - -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). - -### `service_account_token` - -#### Arguments - -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. - -### `volume` - -#### Arguments - -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `csi` - (Optional) CSI represents storage that is handled by an external CSI driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#csi) -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine - -### `volume_mount` - -#### Arguments - -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) - -### `vsphere_volume` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk - -### `ephemeral` - -#### Arguments - -* `volume_claim_template` - (Required) 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. - -### `volume_claim_template` - -#### Arguments - -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. - -### `readiness_gate` - -#### Arguments - -* `condition_type` - (Required) refers to a condition in the pod's condition list with matching type. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_pod` resource: - -* `create` - (Default `5 minutes`) Used for Creating Pods. -* `delete` - (Default `5 minutes`) Used for Destroying Pods. - ## Import Pod can be imported using the namespace and name, e.g. diff --git a/templates/resources/pod_disruption_budget.md.tmpl b/templates/resources/pod_disruption_budget.md.tmpl index c43e26d8be..b2396123cd 100644 --- a/templates/resources/pod_disruption_budget.md.tmpl +++ b/templates/resources/pod_disruption_budget.md.tmpl @@ -5,55 +5,12 @@ description: |- A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_pod_disruption_budget - -A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. - -For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/pod_disruption_budget/example_1.tf"}} - -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource's metadata. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `spec` - (Required) Spec defines the behavior of a Pod Disruption Budget. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments - -* `max_unavailable` - (Optional) Specifies the number of pods from the selected set that can be unavailable after the eviction. It can be either an absolute number or a percentage. You can specify only one of max_unavailable and min_available in a single Pod Disruption Budget. max_unavailable can only be used to control the eviction of pods that have an associated controller managing them. -* `min_available` - (Optional) Specifies the number of pods from the selected set that must still be available after the eviction, even in the absence of the evicted pod. min_available can be either an absolute number or a percentage. You can specify only one of min_available and max_unavailable in a single Pod Disruption Budget. min_available can only be used to control the eviction of pods that have an associated controller managing them. -* `selector` - (Optional) A label query over controllers (Deployment, ReplicationController, ReplicaSet, or StatefulSet) that the Pod Disruption Budget should be applied to. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors diff --git a/templates/resources/pod_disruption_budget_v1.md.tmpl b/templates/resources/pod_disruption_budget_v1.md.tmpl index b4f1665a30..5f27f6637d 100644 --- a/templates/resources/pod_disruption_budget_v1.md.tmpl +++ b/templates/resources/pod_disruption_budget_v1.md.tmpl @@ -5,55 +5,14 @@ description: |- A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_pod_disruption_budget_v1 - -A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. - -For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/pod_disruption_budget_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource's metadata. For more info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status -* `spec` - (Required) Spec defines the behavior of a Pod Disruption Budget. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#idempotency -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#concurrency-control-and-consistency -* `uid` - The unique in time and space value for this service. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - -### `spec` - -#### Arguments -* `max_unavailable` - (Optional) Specifies the number of pods from the selected set that can be unavailable after the eviction. It can be either an absolute number or a percentage. You can specify only one of max_unavailable and min_available in a single Pod Disruption Budget. max_unavailable can only be used to control the eviction of pods that have an associated controller managing them. -* `min_available` - (Optional) Specifies the number of pods from the selected set that must still be available after the eviction, even in the absence of the evicted pod. min_available can be either an absolute number or a percentage. You can specify only one of min_available and max_unavailable in a single Pod Disruption Budget. min_available can only be used to control the eviction of pods that have an associated controller managing them. -* `selector` - (Optional) A label query over controllers (Deployment, ReplicationController, ReplicaSet, or StatefulSet) that the Pod Disruption Budget should be applied to. For more info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors diff --git a/templates/resources/pod_security_policy.md.tmpl b/templates/resources/pod_security_policy.md.tmpl index 6b52761736..aeb59bd85f 100644 --- a/templates/resources/pod_security_policy.md.tmpl +++ b/templates/resources/pod_security_policy.md.tmpl @@ -5,132 +5,18 @@ description: |- A Pod Security Policy is a cluster-level resource that controls security sensitive aspects of the pod specification. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_pod_security_policy +# {{ .Name }} A Pod Security Policy is a cluster-level resource that controls security sensitive aspects of the pod specification. The PodSecurityPolicy objects define a set of conditions that a pod must run with in order to be accepted into the system, as well as defaults for the related fields. +{{ .SchemaMarkdown }} + ~> NOTE: With the release of Kubernetes v1.25, PodSecurityPolicy has been removed. You can read more information about the removal of PodSecurityPolicy in the [Kubernetes 1.25 release notes](https://kubernetes.io/blog/2022/08/23/kubernetes-v1-25-release/#pod-security-changes). ## Example Usage {{tffile "examples/resources/pod_security_policy/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Pod Security Policy's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#metadata) -* `spec` - (Required) Spec contains information for locating and communicating with a server. [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Pod Security Policy that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Pod Security Policy. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Pod Security Policy, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Pod Security Policy that can be used by clients to determine when Pod Security Policy has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Pod Security Policy. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `allow_privilege_escalation` - (Optional) determines if a pod can request to allow privilege escalation. If unspecified, defaults to true. -* `allowed_capabilities` - (Optional) a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities. -* [`allowed_flex_volumes`](#allowed_flex_volumes) - (Optional) a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "volumes" field. -* [`allowed_host_paths`](#allowed_host_paths) - (Optional) a white list of allowed host paths. Empty indicates that all host paths may be used. -* `allowed_proc_mount_types` - (Optional) a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. Possible values are `"Default"` or `"Unmasked"` -* `allowed_unsafe_sysctls` - (Optional) a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of allowed sysctls. Single* means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. Examples: "foo/*" allows "foo/bar", "foo/baz", etc. and "foo.*" allows "foo.bar", "foo.baz", etc. -* `default_add_capabilities` - (Optional) the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list. -* `default_allow_privilege_escalation` - (Optional) controls the default setting for whether a process can gain more privileges than its parent process. -* `forbidden_sysctls` - (Optional) forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of forbidden sysctls. Single* means all sysctls are forbidden. -* [`fs_group`](#fs_group) - (Required) the strategy that will dictate what fs group is used by the SecurityContext. -* `host_ipc` - (Optional) determines if the policy allows the use of HostIPC in the pod spec. -* `host_network` - (Optional) determines if the policy allows the use of HostNetwork in the pod spec. -* `host_pid` - (Optional) determines if the policy allows the use of HostPID in the pod spec. -* `host_ports` - (Optional) determines which host port ranges are allowed to be exposed. -* `privileged` - (Optional) determines if a pod can request to be run as privileged. -* `read_only_root_filesystem` - (Optional) when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to. -* `required_drop_capabilities` - (Optional) the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. -* [`run_as_user`](#run_as_user) - (Required) the strategy that will dictate the allowable RunAsUser values that may be set. -* [`run_as_group`](#run_as_group) - (Optional) the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled. -* [`se_linux`](#se_linux) - (Required) the strategy that will dictate the allowable labels that may be set. -* [`supplemental_groups`](#supplemental_groups) - (Required) the strategy that will dictate what supplemental groups are used by the SecurityContext. -* `volumes` - (Optional) a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - -### allowed_flex_volumes - -### Arguments - -* `driver` - (Required) the name of the Flexvolume driver. - -### allowed_host_paths - -### Arguments - -* `path_prefix` - (Required) the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path. Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar`. `/foo` would not allow `/food` or `/etc/foo` -* `read_only` - (Optional) when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. - -### `fs_group` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate what FSGroup is used in the SecurityContext. -* `range` - (Optional) the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs. - -### `run_as_user` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable RunAsUser values that may be set. -* `range` - (Optional) the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs. - -### `run_as_group` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable RunAsGroup values that may be set. -* `range` - (Optional) the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs. - -### `se_linux` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable labels that may be set. -* `se_linux_options` - (Optional) required to run as; required for MustRunAs. For more info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - -### `supplemental_groups` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate what supplemental groups is used in the SecurityContext. -* `range` - (Optional) the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs. - -### `range` - -#### Arguments - -* `min` - (Required) the start of the range, inclusive. -* `max` - (Required) the end of the range, inclusive. - ## Import Pod Security Policy can be imported using its name, e.g. diff --git a/templates/resources/pod_security_policy_v1beta1.md.tmpl b/templates/resources/pod_security_policy_v1beta1.md.tmpl index 912c7028c9..c6ad622307 100644 --- a/templates/resources/pod_security_policy_v1beta1.md.tmpl +++ b/templates/resources/pod_security_policy_v1beta1.md.tmpl @@ -5,13 +5,11 @@ description: |- A Pod Security Policy is a cluster-level resource that controls security sensitive aspects of the pod specification. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_pod_security_policy_v1beta1 - -A Pod Security Policy is a cluster-level resource that controls security sensitive aspects of the pod specification. The PodSecurityPolicy objects define a set of conditions that a pod must run with in order to be accepted into the system, as well as defaults for the related fields. +{{ .SchemaMarkdown }} ~> NOTE: With the release of Kubernetes v1.25, PodSecurityPolicy has been removed. You can read more information about the removal of PodSecurityPolicy in the [Kubernetes 1.25 release notes](https://kubernetes.io/blog/2022/08/23/kubernetes-v1-25-release/#pod-security-changes). @@ -19,118 +17,6 @@ A Pod Security Policy is a cluster-level resource that controls security sensiti {{tffile "examples/resources/pod_security_policy_v1beta1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Pod Security Policy's metadata. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `spec` - (Required) Spec contains information for locating and communicating with a server. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Pod Security Policy that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Pod Security Policy. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Pod Security Policy, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Pod Security Policy that can be used by clients to determine when Pod Security Policy has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/e59e666e3464c7d4851136baa8835a311efdfb8e/contributors/devel/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Pod Security Policy. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `allow_privilege_escalation` - (Optional) determines if a pod can request to allow privilege escalation. If unspecified, defaults to true. -* `allowed_capabilities` - (Optional) a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities. -* [`allowed_flex_volumes`](#allowed_flex_volumes) - (Optional) a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "volumes" field. -* [`allowed_host_paths`](#allowed_host_paths) - (Optional) a white list of allowed host paths. Empty indicates that all host paths may be used. -* `allowed_proc_mount_types` - (Optional) a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. Possible values are `"Default"` or `"Unmasked"` -* `allowed_unsafe_sysctls` - (Optional) a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of allowed sysctls. Single* means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. Examples: "foo/*" allows "foo/bar", "foo/baz", etc. and "foo.*" allows "foo.bar", "foo.baz", etc. -* `default_add_capabilities` - (Optional) the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list. -* `default_allow_privilege_escalation` - (Optional) controls the default setting for whether a process can gain more privileges than its parent process. -* `forbidden_sysctls` - (Optional) forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of forbidden sysctls. Single* means all sysctls are forbidden. -* [`fs_group`](#fs_group) - (Required) the strategy that will dictate what fs group is used by the SecurityContext. -* `host_ipc` - (Optional) determines if the policy allows the use of HostIPC in the pod spec. -* `host_network` - (Optional) determines if the policy allows the use of HostNetwork in the pod spec. -* `host_pid` - (Optional) determines if the policy allows the use of HostPID in the pod spec. -* `host_ports` - (Optional) determines which host port ranges are allowed to be exposed. -* `privileged` - (Optional) determines if a pod can request to be run as privileged. -* `read_only_root_filesystem` - (Optional) when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to. -* `required_drop_capabilities` - (Optional) the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. -* [`run_as_user`](#run_as_user) - (Required) the strategy that will dictate the allowable RunAsUser values that may be set. -* [`run_as_group`](#run_as_group) - (Optional) the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled. -* [`se_linux`](#se_linux) - (Required) the strategy that will dictate the allowable labels that may be set. -* [`supplemental_groups`](#supplemental_groups) - (Required) the strategy that will dictate what supplemental groups are used by the SecurityContext. -* `volumes` - (Optional) a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - -### allowed_flex_volumes - -### Arguments - -* `driver` - (Required) the name of the Flexvolume driver. - -### allowed_host_paths - -### Arguments - -* `path_prefix` - (Required) the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path. Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar`. `/foo` would not allow `/food` or `/etc/foo` -* `read_only` - (Optional) when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. - -### `fs_group` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate what FSGroup is used in the SecurityContext. -* `range` - (Optional) the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs. - -### `run_as_user` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable RunAsUser values that may be set. -* `range` - (Optional) the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs. - -### `run_as_group` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable RunAsGroup values that may be set. -* `range` - (Optional) the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs. - -### `se_linux` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate the allowable labels that may be set. -* `se_linux_options` - (Optional) required to run as; required for MustRunAs. For more info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - -### `supplemental_groups` - -#### Arguments - -* `rule` - (Required) the strategy that will dictate what supplemental groups is used in the SecurityContext. -* `range` - (Optional) the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs. - -### `range` - -#### Arguments - -* `min` - (Required) the start of the range, inclusive. -* `max` - (Required) the end of the range, inclusive. - ## Import Pod Security Policy can be imported using its name, e.g. diff --git a/templates/resources/pod_v1.md.tmpl b/templates/resources/pod_v1.md.tmpl index 2ac4b3625e..173d02c2a4 100644 --- a/templates/resources/pod_v1.md.tmpl +++ b/templates/resources/pod_v1.md.tmpl @@ -5,15 +5,11 @@ description: |- A pod is a group of one or more containers, the shared storage for those containers, and options about how to run the containers. Pods are always co-located and co-scheduled, and run in a shared context. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_pod_v1 - -A pod is a group of one or more containers, the shared storage for those containers, and options about how to run the containers. Pods are always co-located and co-scheduled, and run in a shared context. - -Read more at [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod/) +{{ .SchemaMarkdown }} ## Example Usage @@ -27,806 +23,6 @@ terraform version of the [pods/pod-with-pod-affinity.yaml](https://raw.githubuse {{tffile "examples/resources/pod_v1/example_3.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard pod's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec of the pod owned by the cluster -* `target_state` - (Optional) A list of the pod phases that indicate whether it was successfully created. Options: "Pending", "Running", "Succeeded", "Failed", "Unknown". Default: "Running". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase") - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the pod that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the pod. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the pod, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the pod must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this pod that can be used by clients to determine when pod has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `affinity` - (Optional) A group of affinity scheduling rules. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `active_deadline_seconds` - (Optional) Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. -* `automount_service_account_token` - (Optional) Indicates whether a service account token should be automatically mounted. Defaults to `true` for Pods. -* `container` - (Optional) List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/) -* `init_container` - (Optional) List of init containers belonging to the pod. Init containers always run to completion and each must complete successfully before the next is started. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) -* `dns_policy` - (Optional) Set DNS policy for containers within the pod. Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Optional: Defaults to 'ClusterFirst', see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). -* `dns_config` - (Optional) Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. Defaults to empty. See `dns_config` block definition below. -* `enable_service_links` - (Optional) Enables generating environment variables for service discovery. Optional: Defaults to true. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service). -* `host_aliases` - (Optional) List of hosts and IPs that will be injected into the pod's hosts file if specified. Optional: Defaults to empty. See `host_aliases` block definition below. -* `host_ipc` - (Optional) Use the host's ipc namespace. Optional: Defaults to false. -* `host_network` - (Optional) Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. -* `host_pid` - (Optional) Use the host's pid namespace. -* `hostname` - (Optional) Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. -* `image_pull_secrets` - (Optional) ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `node_name` - (Optional) NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. -* `node_selector` - (Optional) NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). -* `os` - (Optional) Specifies the OS of the containers in the pod. -* `priority_class_name` - (Optional) If specified, indicates the pod's priority. 'system-node-critical' and 'system-cluster-critical' are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. -* `restart_policy` - (Optional) Restart policy for all containers within the pod. One of Always, OnFailure, Never. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). -* `runtime_class_name` - (Optional) RuntimeClassName is a feature for selecting the container runtime configuration. The container runtime configuration is used to run a Pod's containers. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class) -* `security_context` - (Optional) SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty -* `scheduler_name` - (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. -* `service_account_name` - (Optional) ServiceAccountName is the name of the ServiceAccount to use to run this pod. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/. -* `share_process_namespace` - (Optional) Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. -* `subdomain` - (Optional) If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.. -* `termination_grace_period_seconds` - (Optional) Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. 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. -* `toleration` - (Optional) Optional pod node tolerations. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) -* `topology_spread_constraint` - (Optional) Describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) -* `volume` - (Optional) List of volumes that can be mounted by containers belonging to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes) -* `readiness_gate` - (Optional) If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True". [More info](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-readiness-gate) - -### `affinity` - -#### Arguments - -* `node_affinity` - (Optional) Node affinity scheduling rules for the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) -* `pod_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) -* `pod_anti_affinity` - (Optional) Inter-pod topological affinity. rules that specify that certain pods should be placed in the same topological domain (e.g. same node, same rack, same zone, same power domain, etc.) For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) - -### `node_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` - -#### Arguments - -* `node_selector_term` - (Required) A list of node selector terms. The terms are ORed. - -## `node_selector_term` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -### `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `preference` - (Required) A node selector term, associated with the corresponding weight. - -* `weight` - (Required) Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - -### `preference` - -#### Arguments - -* `match_expressions` - (Optional) A list of node selector requirements by node's labels. - -* `match_fields` - (Optional) A list of node selector requirements by node's fields. - -## `match_expressions` / `match_fields` - -#### Arguments - -* `key` - (Required) The label key that the selector applies to. - -* `operator` - (Required) Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - -* `values` - (Optional) An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - -### `pod_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `pod_anti_affinity` - -#### Arguments - -* `required_during_scheduling_ignored_during_execution` - (Optional) If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. - -* `preferred_during_scheduling_ignored_during_execution` - (Optional) The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. - -### `required_during_scheduling_ignored_during_execution` (pod_affinity_term) - -#### Arguments - -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. -* `namespaces` - (Optional) Specifies which namespaces the `label_selector` applies to (matches against). Null or empty list means "this pod's namespace" -* `topology_key` - (Optional) This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the `label_selector` in the specified namespaces, where co-located is defined as running on a node whose value of the label with key `topology_key` matches that of any node on which any of the selected pods is running. Empty `topology_key` is not allowed. - -### `preferred_during_scheduling_ignored_during_execution` - -#### Arguments - -* `pod_affinity_term` - (Required) A pod affinity term, associated with the corresponding weight. -* `weight` - (Required) Weight associated with matching the corresponding `pod_affinity_term`, in the range 1-100. - -### `os` - -#### Arguments - -* `name` - (Required) Name is the name of the operating system. The currently supported values are `linux` and `windows`. - -### `container` - -#### Arguments - -* `args` - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `command` - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) -* `env` - (Optional) Block of string name and value pairs to set in the container's environment. May be declared multiple times. Cannot be updated. -* `env_from` - (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. -* `image` - (Optional) Docker image name. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/) -* `image_pull_policy` - (Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#updating-images) -* `lifecycle` - (Optional) Actions that the management system should take in response to container lifecycle events -* `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `name` - (Required) Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. -* `port` - (Optional) Block(s) of [port](#port)s to expose on the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. May be used multiple times. Cannot be updated. -* `readiness_probe` - (Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `resources` - (Optional) Compute Resources required by this container. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources) -* `security_context` - (Optional) Security options the pod should run with. For more info see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/. -* `startup_probe` - (Optional) 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. For more info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.17** -* `stdin` - (Optional) Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. -* `stdin_once` - (Optional) Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. -* `termination_message_path` - (Optional) Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated. -* `termination_message_policy` - (Optional): Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. -* `tty` - (Optional) Whether this container should allocate a TTY for itself -* `volume_mount` - (Optional) Pod volumes to mount into the container's filesystem. Cannot be updated. -* `working_dir` - (Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. - -### `aws_elastic_block_store` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `partition` - (Optional) 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). -* `read_only` - (Optional) Whether to set the read-only property in VolumeMounts to "true". If omitted, the default is "false". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `volume_id` - (Required) Unique ID of the persistent disk resource in AWS (Amazon EBS volume). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) - -### `azure_disk` - -#### Arguments - -* `caching_mode` - (Required) Host Caching mode: None, Read Only, Read Write. -* `data_disk_uri` - (Required) The URI the data disk in the blob storage -* `disk_name` - (Required) The Name of the data disk in the blob storage -* `fs_type` - (Optional) 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. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). - -### `azure_file` - -#### Arguments - -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `secret_name` - (Required) The name of secret that contains Azure Storage Account Name and Key -* `share_name` - (Required) Share Name - -### `capabilities` - -#### Arguments - -* `add` - (Optional) Added capabilities -* `drop` - (Optional) Removed capabilities - -### `ceph_fs` - -#### Arguments - -* `monitors` - (Required) Monitors is a collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `path` - (Optional) Used as the mounted root, rather than the full Ceph tree, default is /. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to `false` (read/write). For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_file` - (Optional) The path to key ring for User, default is /etc/ceph/user.secret. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `secret_ref` - (Optional) Reference to the authentication secret for User, default is empty. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. -* `user` - (Optional) User is the rados user name, default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/cephfs/#how-to-use-it. - -### `cinder` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `volume_id` - (Required) Volume ID used to identify the volume in Cinder. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. - -### `config_map` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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 '..'. -* `optional` - (Optional) Specify whether the ConfigMap or its keys must be defined. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `config_map_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the ConfigMap must be defined - -### `config_map_key_ref` - -#### Arguments - -* `key` - (Optional) The key to select. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined - -### `dns_config` - -#### Arguments - -* `nameservers` - (Optional) A list of DNS name server IP addresses specified as strings. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. Optional: Defaults to empty. -* `option` - (Optional) A list of DNS resolver options specified as blocks with `name`/`value` pairs. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. Optional: Defaults to empty. -* `searches` - (Optional) A list of DNS search domains for host-name lookup specified as strings. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. Optional: Defaults to empty. - -The `option` block supports the following: - -* `name` - (Required) Name of the option. -* `value` - (Optional) Value of the option. Optional: Defaults to empty. - -### `downward_api` - -#### Arguments - -* `default_mode` - (Optional) Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) 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. Paths must be relative and may not contain the '..' path or start with '..'. - -### `empty_dir` - -#### Arguments - -* `medium` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `size_limit` - (Optional) Total amount of local storage required for this EmptyDir volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) and [Kubernetes Quantity type](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource?tab=doc#Quantity). - -### `env` - -#### Arguments - -* `name` - (Required) Name of the environment variable. Must be a C_IDENTIFIER -* `value` - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". -* `value_from` - (Optional) Source for the environment variable's value - -### `env_from` - -#### Arguments - -* `config_map_ref` - (Optional) The ConfigMap to select from -* `prefix` - (Optional) An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.. -* `secret_ref` - (Optional) The Secret to select from - -### `exec` - -#### Arguments - -* `command` - (Optional) 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. 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. - -### `fc` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `lun` - (Required) FC target lun number -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false (read/write). -* `target_ww_ns` - (Required) FC target worldwide names (WWNs) - -### `field_ref` - -#### Arguments - -* `api_version` - (Optional) Version of the schema the FieldPath is written in terms of, defaults to "v1". -* `field_path` - (Optional) Path of the field to select in the specified API version - -### `flex_volume` - -#### Arguments - -* `driver` - (Required) Driver is the name of the driver to use for this volume. -* `fs_type` - (Optional) 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. -* `options` - (Optional) Extra command options if any. -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false (read/write). -* `secret_ref` - (Optional) 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. - -### `flocker` - -#### Arguments - -* `dataset_name` - (Optional) Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated -* `dataset_uuid` - (Optional) UUID of the dataset. This is unique identifier of a Flocker dataset - -### `gce_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `partition` - (Optional) 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). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `pd_name` - (Required) Unique name of the PD resource in GCE. Used to identify the disk in GCE. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `read_only` - (Optional) Whether to force the ReadOnly setting in VolumeMounts. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) - -### `git_repo` - -#### Arguments - -* `directory` - (Optional) 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. -* `repository` - (Optional) Repository URL -* `revision` - (Optional) Commit hash for the specified revision. - -### `glusterfs` - -#### Arguments - -* `endpoints_name` - (Required) The endpoint name that details Glusterfs topology. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `path` - (Required) The Glusterfs volume path. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. -* `read_only` - (Optional) Whether to force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#create-a-pod. - -### `grpc` - -#### Arguments - -* `port` - (Required) Number of the port to access on the container. Number must be in the range 1 to 65535. -* `service` - (Optional) 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. - -### `host_aliases` - -#### Arguments - -* `hostnames` - (Required) Array of hostnames for the IP address. -* `ip` - (Required) IP address of the host file entry. - -### `host_path` - -#### Arguments - -* `path` - (Optional) Path of the directory on the host. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `type` - (Optional) Type for HostPath volume. Defaults to "". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) - -### `http_get` - -#### Arguments - -* `host` - (Optional) Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. -* `http_header` - (Optional) Scheme to use for connecting to the host. -* `path` - (Optional) Path to access on the HTTP server. -* `port` - (Optional) 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. -* `scheme` - (Optional) Scheme to use for connecting to the host. - -### `http_header` - -#### Arguments - -* `name` - (Optional) The header field name -* `value` - (Optional) The header field value - -### `image_pull_secrets` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `iscsi` - -#### Arguments - -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#iscsi) -* `iqn` - (Required) Target iSCSI Qualified Name. -* `iscsi_interface` - (Optional) iSCSI interface name that uses an iSCSI transport. Defaults to 'default' (tcp). -* `lun` - (Optional) iSCSI target lun number. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. -* `target_portal` - (Required) 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). - -### `items` - -#### Arguments - -* `key` - (Optional) The key to project. -* `mode` - (Optional) Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. -* `path` - (Optional) 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 '..'. - -### `lifecycle` - -#### Arguments - -* `post_start` - (Optional) post_start is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) -* `pre_stop` - (Optional) pre_stop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) - -### `liveness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before liveness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `nfs` - -#### Arguments - -* `path` - (Required) Path that is exported by the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `read_only` - (Optional) Whether to force the NFS export to be mounted with read-only permissions. Defaults to false. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `server` - (Required) Server is the hostname or IP address of the NFS server. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) - -### `persistent_volume_claim` - -#### Arguments - -* `claim_name` - (Optional) ClaimName is the name of a PersistentVolumeClaim in the same -* `read_only` - (Optional) Will force the ReadOnly setting in VolumeMounts. - -### `photon_persistent_disk` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `pd_id` - (Required) ID that identifies Photon Controller persistent disk - -### `port` - -#### Arguments - -* `container_port` - (Required) Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. -* `host_ip` - (Optional) What host IP to bind the external port to. -* `host_port` - (Optional) Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. -* `name` - (Optional) If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services -* `protocol` - (Optional) Protocol for port. Must be UDP or TCP. Defaults to "TCP". - -### `post_start` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `pre_stop` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `http_get` - (Optional) Specifies the http request to perform. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - -### `quobyte` - -#### Arguments - -* `group` - (Optional) Group to map volume access to Default is no group -* `read_only` - (Optional) Whether to force the Quobyte volume to be mounted with read-only permissions. Defaults to false. -* `registry` - (Required) 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 -* `user` - (Optional) User to map volume access to Defaults to serivceaccount user -* `volume` - (Required) Volume is a string that references an already created Quobyte volume by name. - -### `rbd` - -#### Arguments - -* `ceph_monitors` - (Required) A collection of Ceph monitors. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `fs_type` - (Optional) 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. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#rbd) -* `keyring` - (Optional) Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rados_user` - (Optional) The rados user name. Default is admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rbd_image` - (Required) The rados image name. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `rbd_pool` - (Optional) The rados pool name. Default is rbd. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `read_only` - (Optional) Whether to force the read-only setting in VolumeMounts. Defaults to false. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. -* `secret_ref` - (Optional) Name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. For more info see https://github.com/kubernetes/examples/tree/master/volumes/rbd/#how-to-use-it. - -### `readiness_probe` - -#### Arguments - -* `exec` - (Optional) exec specifies the action to take. -* `failure_threshold` - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. -* `grpc` - (Optional) GRPC specifies an action involving a GRPC port. **NOTE: This field is behind a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) prior to v1.24** -* `http_get` - (Optional) Specifies the http request to perform. -* `initial_delay_seconds` - (Optional) Number of seconds after the container has started before readiness probes are initiated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) -* `period_seconds` - (Optional) How often (in seconds) to perform the probe -* `success_threshold` - (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. -* `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported -* `timeout_seconds` - (Optional) Number of seconds after which the probe times out. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) - -### `resources` - -#### Arguments - -* `limits` - (Optional) Describes the maximum amount of compute resources allowed. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) -* `requests` - (Optional) Describes the minimum amount of compute resources required. - -`resources` is a computed attribute and thus if it is not configured in terraform code, the value will be computed from the returned Kubernetes object. That causes a situation when removing `resources` from terraform code does not update the Kubernetes object. In order to delete `resources` from the Kubernetes object, configure an empty attribute in your code. - -Please, look at the example below: - -{{tffile "examples/resources/pod_v1/example_4.tf"}} - -### `resource_field_ref` - -#### Arguments - -* `container_name` - (Optional) The name of the container -* `resource` - (Required) Resource to select -* `divisor` - (Optional) Specifies the output format of the exposed resources, defaults to "1". - -### `seccomp_profile` - -#### Attributes - -* `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` - (Default) no profile should be applied. -* `localhost_profile` - 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 only be set if `type` is `Localhost`. - -### `se_linux_options` - -#### Arguments - -* `level` - (Optional) Level is SELinux level label that applies to the container. -* `role` - (Optional) Role is a SELinux role label that applies to the container. -* `type` - (Optional) Type is a SELinux type label that applies to the container. -* `user` - (Optional) User is a SELinux user label that applies to the container. - -### `secret` - -#### Arguments - -* `default_mode` - (Optional) Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. -* `items` - (Optional) List of Secret Items to project into the volume. See `items` block definition below. 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 '..'. -* `optional` - (Optional) Specify whether the Secret or its keys must be defined. -* `secret_name` - (Optional) Name of the secret in the pod's namespace to use. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) - -The `items` block supports the following: - -* `key` - (Required) The key to project. -* `mode` - (Optional) Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. -* `path` - (Required) 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 '..'. - -### `secret_ref` - -#### Arguments - -* `name` - (Required) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret must be defined - -### `secret_key_ref` - -#### Arguments - -* `key` - (Optional) The key of the secret to select from. Must be a valid secret key. -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `optional` - (Optional) Specify whether the Secret or its key must be defined - -### `secret_ref` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### container `security_context` - -#### Arguments - -* `allow_privilege_escalation` - (Optional) 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 -* `capabilities` - (Optional) The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. -* `privileged` - (Optional) Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. -* `read_only_root_filesystem` - (Optional) Whether this container has a read-only root filesystem. Default is false. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `sysctl` - (Optional) holds a list of namespaced sysctls used for the pod. see [Sysctl](#sysctl) block. See [official docs](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) for more details. - -##### Sysctl - -* `name` - (Required) Name of a property to set. -* `value` - (Required) Value of a property to set. - -### `capabilities` - -#### Arguments - -* `add` - (Optional) A list of added capabilities. -* `drop` - (Optional) A list of removed capabilities. - -### pod `security_context` - -#### Arguments - -* `fs_group` - (Optional) 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. -* `run_as_group` - (Optional) 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. -* `run_as_non_root` - (Optional) 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. -* `run_as_user` - (Optional) 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. -* `seccomp_profile` - The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. -* `se_linux_options` - (Optional) 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. -* `supplemental_groups` - (Optional) A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. - -### `tcp_socket` - -#### Arguments - -* `port` - (Required) 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. - -### `toleration` - -#### Arguments - -* `effect` - (Optional) Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. -* `key` - (Optional) Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. -* `operator` - (Optional) Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. -* `toleration_seconds` - (Optional) TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. -* `value` - (Optional) Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - -### `topology_spread_constraint` - -#### Arguments - -* `match_label_keys` - (Optional) Is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both `match_label_keys` and `label_selector`. `match_label_keys` cannot be set when `label_selector` isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against `label_selector`. -* `max_skew` - (Optional) Describes the degree to which pods may be unevenly distributed. Default value is `1`. -* `min_domains` - (Optional) Indicates a minimum number of eligible domains. Must be number greater than `0`. When set, `when_unsatisfiable` must be set to `DoNotSchedule`. -* `node_affinity_policy` - (Optional) Indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Valid values are `Honor` and `Ignore`. When unset, behavior defaults to `Honor`. -* `node_taints_policy` - (Optional) Indicates how we will treat node taints when calculating pod topology spread skew. Valid values are `Honor` and `Ignore`. When unset, behavior defaults to `Ignore`. -* `topology_key` - (Optional) The key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. -* `when_unsatisfiable` - (Optional) Indicates how to deal with a pod if it doesn't satisfy the spread constraint. Valid values are `DoNotSchedule` and `ScheduleAnyway`. Default value is `DoNotSchedule`. -* `label_selector` - (Optional) A label query over a set of resources, in this case pods. - -### `value_from` - -#### Arguments - -* `config_map_key_ref` - (Optional) Selects a key of a ConfigMap. -* `field_ref` - (Optional) Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. -* `resource_field_ref` - (Optional) Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. -* `secret_key_ref` - (Optional) Selects a key of a secret in the pod's namespace. - -### `projected` - -#### Arguments - -* `default_mode` - (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. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -* `sources` - (Required) List of volume projection sources - -### `sources` - -#### Arguments - -* `config_map` - (Optional) Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -* `downward_api` - (Optional) Represents downward API info for projecting into a projected volume. Note that this is identical to a downward_api volume source without the default mode. -* `secret` - (Optional) Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -* `service_account_token` - (Optional) Represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). - -### `service_account_token` - -#### Arguments - -* `audience` - (Optional) 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. -* `expiration_seconds` - (Optional) 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. -* `path` - (Required) Path is the path relative to the mount point of the file to project the token into. - -### `volume` - -#### Arguments - -* `aws_elastic_block_store` - (Optional) Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore) -* `azure_disk` - (Optional) Represents an Azure Data Disk mount on the host and bind mount to the pod. -* `azure_file` - (Optional) Represents an Azure File Service mount on the host and bind mount to the pod. -* `ceph_fs` - (Optional) Represents a Ceph FS mount on the host that shares a pod's lifetime -* `cinder` - (Optional) Represents a cinder volume attached and mounted on kubelets host machine. For more info see https://github.com/kubernetes/examples/blob/master/mysql-cinder-pd/README.md#mysql-installation-with-cinder-volume-plugin. -* `config_map` - (Optional) ConfigMap represents a configMap that should populate this volume -* `downward_api` - (Optional) DownwardAPI represents downward API about the pod that should populate this volume -* `empty_dir` - (Optional) EmptyDir represents a temporary directory that shares a pod's lifetime. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#emptydir) -* `ephemeral` - (Optional) Represents an ephemeral volume that is handled by a normal storage driver. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) -* `fc` - (Optional) Represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. -* `flex_volume` - (Optional) Represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. -* `flocker` - (Optional) Represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running -* `gce_persistent_disk` - (Optional) Represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk) -* `git_repo` - (Optional) GitRepo represents a git repository at a particular revision. -* `glusterfs` - (Optional) Represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. For more info see https://github.com/kubernetes/examples/tree/master/volumes/glusterfs#glusterfs. -* `host_path` - (Optional) Represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#hostpath) -* `iscsi` - (Optional) Represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. -* `name` - (Optional) Volume's name. Must be a DNS_LABEL and unique within the pod. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `nfs` - (Optional) Represents an NFS mount on the host. Provisioned by an admin. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#nfs) -* `persistent_volume_claim` - (Optional) The specification of a persistent volume. -* `photon_persistent_disk` - (Optional) Represents a PhotonController persistent disk attached and mounted on kubelets host machine -* `projected` (Optional) Items for all in one resources secrets, configmaps, and downward API. -* `quobyte` - (Optional) Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -* `rbd` - (Optional) Represents a Rados Block Device mount on the host that shares a pod's lifetime. For more info see https://kubernetes.io/docs/concepts/storage/volumes/#rbd. -* `secret` - (Optional) Secret represents a secret that should populate this volume. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes#secrets) -* `vsphere_volume` - (Optional) Represents a vSphere volume attached and mounted on kubelets host machine - -### `volume_mount` - -#### Arguments - -* `mount_path` - (Required) Path within the container at which the volume should be mounted. Must not contain ':'. -* `name` - (Required) This must match the Name of a Volume. -* `read_only` - (Optional) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. -* `sub_path` - (Optional) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). -* `mount_propagation` - (Optional) Mount propagation mode. Defaults to "None". For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation) - -### `vsphere_volume` - -#### Arguments - -* `fs_type` - (Optional) 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. -* `volume_path` - (Required) Path that identifies vSphere volume vmdk - -### `ephemeral` - -#### Arguments - -* `volume_claim_template` - (Required) 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. - -### `volume_claim_template` - -#### Arguments - -* `metadata` - (Optional) 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. -* `spec` - (Required) Please see the [persistent_volume_claim_v1 resource](persistent_volume_claim_v1.html#spec) for reference. - -### `readiness_gate` - -#### Arguments - -* `condition_type` - (Required) refers to a condition in the pod's condition list with matching type. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_pod_v1` resource: - -* `create` - (Default `5 minutes`) Used for Creating Pods. -* `delete` - (Default `5 minutes`) Used for Destroying Pods. - ## Import Pod can be imported using the namespace and name, e.g. diff --git a/templates/resources/priority_class.md.tmpl b/templates/resources/priority_class.md.tmpl index 5d00f987cf..cac93c9730 100644 --- a/templates/resources/priority_class.md.tmpl +++ b/templates/resources/priority_class.md.tmpl @@ -5,50 +5,16 @@ description: |- A PriorityClass is a non-namespaced object that defines a mapping from a priority class name to the integer value of the priority. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_priority_class +# {{ .Name }} A PriorityClass is a non-namespaced object that defines a mapping from a priority class name to the integer value of the priority. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/priority_class/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource quota's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `value` - (Required, Forces new resource) The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec. -* `description` - (Optional) An arbitrary string that usually provides guidelines on when this priority class should be used. -* `global_default` - (Optional) Boolean that specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. -* `preemption_policy` - (Optional) PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource quota that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the resource quota. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the resource quota, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this resource quota that can be used by clients to determine when resource quota has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this resource quota. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import Priority Class can be imported using its name, e.g. diff --git a/templates/resources/priority_class_v1.md.tmpl b/templates/resources/priority_class_v1.md.tmpl index a7dcb5b7e7..9989f7a9c5 100644 --- a/templates/resources/priority_class_v1.md.tmpl +++ b/templates/resources/priority_class_v1.md.tmpl @@ -5,51 +5,16 @@ description: |- A PriorityClass is a non-namespaced object that defines a mapping from a priority class name to the integer value of the priority. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_priority_class_v1 - -A PriorityClass is a non-namespaced object that defines a mapping from a priority class name to the integer value of the priority. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/priority_class_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource quota's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `value` - (Required, Forces new resource) The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec. -* `description` - (Optional) An arbitrary string that usually provides guidelines on when this priority class should be used. -* `global_default` - (Optional) Boolean that specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. -* `preemption_policy` - (Optional) PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource quota that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the resource quota. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the resource quota, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this resource quota that can be used by clients to determine when resource quota has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this resource quota. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) -* `preemption_policy` - PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. - ## Import Priority Class can be imported using its name, e.g. diff --git a/templates/resources/replication_controller.md.tmpl b/templates/resources/replication_controller.md.tmpl index 1dd12b4f7a..34ca296e7b 100644 --- a/templates/resources/replication_controller.md.tmpl +++ b/templates/resources/replication_controller.md.tmpl @@ -5,102 +5,18 @@ description: |- A Replication Controller ensures that a specified number of pod “replicas” are running at any one time. In other words, a Replication Controller makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Replication Controller will start more. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_replication_controller +# {{ .Name }} A Replication Controller ensures that a specified number of pod “replicas” are running at any one time. In other words, a Replication Controller makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Replication Controller will start more. ~> **WARNING:** In many cases it is recommended to create a Deployment instead of a Replication Controller. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/replication_controller/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard replication controller's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the replication controller. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the replication controller that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the replication controller. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the replication controller, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the replication controller must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this replication controller that can be used by clients to determine when replication controller has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this replication controller. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `replicas` - (Optional) The number of desired replicas. Defaults to 1. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller) -* `selector` - (Required) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this replication controller. **Should match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions) -* `template` - (Required) Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template) - -## Nested Blocks - -### `spec.template` - -#### Arguments - -* `metadata` - (Optional) Standard object's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). While required by the kubernetes API, this field is marked as optional to allow the usage of the deprecated pod spec fields that were mistakenly placed directly under the `template` block. - -* `spec` - (Optional) Specification of the desired behavior of the pod. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -~> **NOTE:** all the fields from the `spec.template.spec` block are also accepted at the `spec.template` level but that usage is deprecated. All existing configurations should be updated to only use the new fields under `spec.template.spec`. Mixing the usage of deprecated fields with new fields is not supported. - -## Nested Blocks - -### `spec.template.metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the replication controller that may be used to store arbitrary metadata. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the pods managed by this replication controller . **Should match `selector`**. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions) -* `name` - (Optional) Name of the replication controller, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the replication controller must be unique. - -## Nested Blocks - -### `spec.template.spec` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available: - -- `create` - (Default `10 minutes`) Used for creating new controller -- `update` - (Default `10 minutes`) Used for updating a controller -- `delete` - (Default `10 minutes`) Used for destroying a controller - ## Import Replication Controller can be imported using the namespace and name, e.g. diff --git a/templates/resources/replication_controller_v1.md.tmpl b/templates/resources/replication_controller_v1.md.tmpl index e094facddf..3406346260 100644 --- a/templates/resources/replication_controller_v1.md.tmpl +++ b/templates/resources/replication_controller_v1.md.tmpl @@ -5,13 +5,11 @@ description: |- A Replication Controller ensures that a specified number of pod “replicas” are running at any one time. In other words, a Replication Controller makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Replication Controller will start more. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_replication_controller_v1 - -A Replication Controller ensures that a specified number of pod “replicas” are running at any one time. In other words, a Replication Controller makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the Replication Controller will start more. +{{ .SchemaMarkdown }} ~> **WARNING:** In many cases it is recommended to create a Deployment instead of a Replication Controller. @@ -19,88 +17,6 @@ A Replication Controller ensures that a specified number of pod “replicas” a {{tffile "examples/resources/replication_controller_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard replication controller's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the replication controller. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the replication controller that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the replication controller. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the replication controller, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the replication controller must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this replication controller that can be used by clients to determine when replication controller has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this replication controller. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `min_ready_seconds` - (Optional) Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) -* `replicas` - (Optional) The number of desired replicas. Defaults to 1. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller) -* `selector` - (Required) A label query over pods that should match the Replicas count. Label keys and values that must match in order to be controlled by this replication controller. **Should match labels (`metadata.0.labels`)**. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions) -* `template` - (Required) Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template) - -## Nested Blocks - -### `spec.template` - -#### Arguments - -* `metadata` - (Optional) Standard object's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). While required by the kubernetes API, this field is marked as optional to allow the usage of the deprecated pod spec fields that were mistakenly placed directly under the `template` block. - -* `spec` - (Optional) Specification of the desired behavior of the pod. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -~> **NOTE:** all the fields from the `spec.template.spec` block are also accepted at the `spec.template` level but that usage is deprecated. All existing configurations should be updated to only use the new fields under `spec.template.spec`. Mixing the usage of deprecated fields with new fields is not supported. - -## Nested Blocks - -### `spec.template.metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the replication controller that may be used to store arbitrary metadata. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the pods managed by this replication controller . **Should match `selector`**. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions) -* `name` - (Optional) Name of the replication controller, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the replication controller must be unique. - -## Nested Blocks - -### `spec.template.spec` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod.html#spec) for reference. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available: - -- `create` - (Default `10 minutes`) Used for creating new controller -- `update` - (Default `10 minutes`) Used for updating a controller -- `delete` - (Default `10 minutes`) Used for destroying a controller - ## Import Replication Controller can be imported using the namespace and name, e.g. diff --git a/templates/resources/resource_quota.md.tmpl b/templates/resources/resource_quota.md.tmpl index 586e528e60..76c17c03e4 100644 --- a/templates/resources/resource_quota.md.tmpl +++ b/templates/resources/resource_quota.md.tmpl @@ -5,70 +5,16 @@ description: |- A resource quota provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that project. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_resource_quota +# {{ .Name }} A resource quota provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that project. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/resource_quota/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource quota's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Optional) Spec defines the desired quota. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource quota that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the resource quota. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the resource quota, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the resource quota must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this resource quota that can be used by clients to determine when resource quota has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this resource quota. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `hard` - (Optional) The set of desired hard limits for each named resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/policy/resource-quotas) -* `scopes` - (Optional) A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. -* `scope_selector` - (Optional) A collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. See `scope_selector` below for more details. - -#### `scope_selector` - -##### Arguments - -* `match_expression` - (Optional) A list of scope selector requirements by scope of the resources. See `match_expression` below for more details. - -##### `match_expression` - -###### Arguments - -* `scope_name` - (Required) The name of the scope that the selector applies to. Valid values are `Terminating`, `NotTerminating`, `BestEffort`, `NotBestEffort`, and `PriorityClass`. -* `operator` - (Required) Represents a scope's relationship to a set of values. Valid operators are `In`, `NotIn`, `Exists`, `DoesNotExist`. -* `values` - (Optional) A list of scope selector requirements by scope of the resources. - ## Import Resource Quota can be imported using its namespace and name, e.g. diff --git a/templates/resources/resource_quota_v1.md.tmpl b/templates/resources/resource_quota_v1.md.tmpl index 4934dba37d..adc18044af 100644 --- a/templates/resources/resource_quota_v1.md.tmpl +++ b/templates/resources/resource_quota_v1.md.tmpl @@ -5,70 +5,16 @@ description: |- A resource quota provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that project. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_resource_quota_v1 - -A resource quota provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that project. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/resource_quota_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard resource quota's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Optional) Spec defines the desired quota. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the resource quota that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the resource quota. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the resource quota, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the resource quota must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this resource quota that can be used by clients to determine when resource quota has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this resource quota. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `hard` - (Optional) The set of desired hard limits for each named resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/policy/resource-quotas) -* `scopes` - (Optional) A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. -* `scope_selector` - (Optional) A collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. See `scope_selector` below for more details. - -#### `scope_selector` - -##### Arguments - -* `match_expression` - (Optional) A list of scope selector requirements by scope of the resources. See `match_expression` below for more details. - -##### `match_expression` - -###### Arguments - -* `scope_name` - (Required) The name of the scope that the selector applies to. Valid values are `Terminating`, `NotTerminating`, `BestEffort`, `NotBestEffort`, and `PriorityClass`. -* `operator` - (Required) Represents a scope's relationship to a set of values. Valid operators are `In`, `NotIn`, `Exists`, `DoesNotExist`. -* `values` - (Optional) A list of scope selector requirements by scope of the resources. - ## Import Resource Quota can be imported using its namespace and name, e.g. diff --git a/templates/resources/role.md.tmpl b/templates/resources/role.md.tmpl index edcf3076db..78cd7b87bb 100644 --- a/templates/resources/role.md.tmpl +++ b/templates/resources/role.md.tmpl @@ -5,58 +5,16 @@ description: |- A role contains rules that represent a set of permissions. Permissions are purely additive (there are no “deny” rules). --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_role +# {{ .Name }} A role contains rules that represent a set of permissions. Permissions are purely additive (there are no “deny” rules). +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/role/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard role's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `rule` - (Required) List of rules that define the set of permissions for this role. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](hhttps://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the role must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this role that can be used by clients to determine when role has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this role. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `rule` - -#### Arguments - -* `api_groups` - (Required) List of APIGroups that contains the resources. -* `resources` - (Required) List of resources that the rule applies to. -* `resource_names` - (Optional) White list of names that the rule applies to. -* `verbs` - (Required) List of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. - ## Import Role can be imported using the namespace and name, e.g. diff --git a/templates/resources/role_binding.md.tmpl b/templates/resources/role_binding.md.tmpl index 2bfedd0648..9b064dfb28 100644 --- a/templates/resources/role_binding.md.tmpl +++ b/templates/resources/role_binding.md.tmpl @@ -5,11 +5,9 @@ description: |- A RoleBinding may be used to grant permission at the namespace level. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_role_binding +{{ .SchemaMarkdown }} A RoleBinding may be used to grant permission at the namespace level @@ -17,55 +15,6 @@ A RoleBinding may be used to grant permission at the namespace level {{tffile "examples/resources/role_binding/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `role_ref` - (Required) The Role to bind Subjects to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) -* `subject` - (Required) The Users, Groups, or ServiceAccounts to grand permissions to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-subjects) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the role binding must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `role_ref` - -#### Arguments - -* `name` - (Required) The name of this Role to bind Subjects to. -* `kind` - (Required) The type of binding to use. This value must be present and defaults to `Role` -* `api_group` - (Required) The API group to drive authorization decisions. This value must be and defaults to `rbac.authorization.k8s.io` - -### `subject` - -#### Arguments - -* `name` - (Required) The name of this Role to bind Subjects to. -* `namespace` - (Optional) Namespace defines the namespace of the ServiceAccount to bind to. This value only applies to kind `ServiceAccount` -* `kind` - (Required) The type of binding to use. This value must be `ServiceAccount`, `User` or `Group` -* `api_group` - (Required) The API group to drive authorization decisions. This value only applies to kind `User` and `Group`. It must be `rbac.authorization.k8s.io` - ## Import RoleBinding can be imported using the name, e.g. diff --git a/templates/resources/role_binding_v1.md.tmpl b/templates/resources/role_binding_v1.md.tmpl index 8632868eab..2830a35e14 100644 --- a/templates/resources/role_binding_v1.md.tmpl +++ b/templates/resources/role_binding_v1.md.tmpl @@ -5,67 +5,16 @@ description: |- A RoleBinding may be used to grant permission at the namespace level. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_role_binding_v1 - -A RoleBinding may be used to grant permission at the namespace level +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/role_binding_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard kubernetes metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `role_ref` - (Required) The Role to bind Subjects to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) -* `subject` - (Required) The Users, Groups, or ServiceAccounts to grand permissions to. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-subjects) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role binding that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role binding. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role binding, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the role binding must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this object that can be used by clients to determine when the object has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this role binding. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `role_ref` - -#### Arguments - -* `name` - (Required) The name of this Role to bind Subjects to. -* `kind` - (Required) The type of binding to use. This value must be present and defaults to `Role` -* `api_group` - (Required) The API group to drive authorization decisions. This value must be and defaults to `rbac.authorization.k8s.io` - -### `subject` - -#### Arguments - -* `name` - (Required) The name of this Role to bind Subjects to. -* `namespace` - (Optional) Namespace defines the namespace of the ServiceAccount to bind to. This value only applies to kind `ServiceAccount` -* `kind` - (Required) The type of binding to use. This value must be `ServiceAccount`, `User` or `Group` -* `api_group` - (Required) The API group to drive authorization decisions. This value only applies to kind `User` and `Group`. It must be `rbac.authorization.k8s.io` - ## Import RoleBinding can be imported using the name, e.g. diff --git a/templates/resources/role_v1.md.tmpl b/templates/resources/role_v1.md.tmpl index a6a0e37bd5..6561c44ad9 100644 --- a/templates/resources/role_v1.md.tmpl +++ b/templates/resources/role_v1.md.tmpl @@ -5,58 +5,16 @@ description: |- A role contains rules that represent a set of permissions. Permissions are purely additive (there are no “deny” rules). --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_role_v1 - -A role contains rules that represent a set of permissions. Permissions are purely additive (there are no “deny” rules). +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/role_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard role's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `rule` - (Required) List of rules that define the set of permissions for this role. For more info see [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](hhttps://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the role must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this role that can be used by clients to determine when role has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this role. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `rule` - -#### Arguments - -* `api_groups` - (Required) List of APIGroups that contains the resources. -* `resources` - (Required) List of resources that the rule applies to. -* `resource_names` - (Optional) White list of names that the rule applies to. -* `verbs` - (Required) List of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. - ## Import Role can be imported using the namespace and name, e.g. diff --git a/templates/resources/runtime_class_v1.md.tmpl b/templates/resources/runtime_class_v1.md.tmpl index ccb3dc76b2..24ebce9ae6 100644 --- a/templates/resources/runtime_class_v1.md.tmpl +++ b/templates/resources/runtime_class_v1.md.tmpl @@ -5,48 +5,16 @@ description: |- A runtime class is used to determine which container runtime is used to run all containers in a pod. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_runtime_class_v1 - -A runtime class is used to determine which container runtime is used to run all containers in a pod. +{{ .SchemaMarkdown }} ## Example usage {{tffile "examples/resources/runtime_class_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard role's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `handler` - (Required) Specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/runtime-class/) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](hhttps://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this role that can be used by clients to determine when role has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this role. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import Runtime class can be imported using the name only, e.g. diff --git a/templates/resources/secret.md.tmpl b/templates/resources/secret.md.tmpl index 9b8f3b7657..7209254287 100644 --- a/templates/resources/secret.md.tmpl +++ b/templates/resources/secret.md.tmpl @@ -5,11 +5,7 @@ description: |- The resource provides mechanisms to inject containers with sensitive information while keeping containers agnostic of Kubernetes. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_secret +# {{ .Name }} The resource provides mechanisms to inject containers with sensitive information, such as passwords, while keeping containers agnostic of Kubernetes. Secrets can be used to store sensitive information either as individual properties or coarse-grained entries like entire files or JSON blobs. The resource will by default create a secret which is available to any pod in the specified (or default) namespace. @@ -17,6 +13,8 @@ The resource provides mechanisms to inject containers with sensitive information ~> **Note:** All arguments including the secret data will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/secret/example_1.tf"}} @@ -41,47 +39,6 @@ $ kubectl create secret docker-registry docker-cfg --docker-server=${registry_se {{tffile "examples/resources/secret/example_4.tf"}} -## Argument Reference - -The following arguments are supported: - -* `data` - (Optional) A map of the secret data. -* `binary_data` - (Optional) A map base64 encoded map of the secret data. -* `metadata` - (Required) Standard secret's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `type` - (Optional) The secret type. Defaults to `Opaque`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/c7151dd8dd7e487e96e5ce34c6a416bb3b037609/contributors/design-proposals/auth/secrets.md#proposed-design) -* `immutable` - (Optional) Ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. -* `wait_for_service_account_token` - (Optional) Terraform will wait for the service account token to be created. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the secret that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the secret. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the secret, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the secret must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this secret that can be used by clients to determine when secret has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this secret. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### Timeouts - -`kubernetes_secret` provides the following configuration options: - -- `create` - Default `1 minute` - ## Import Secret can be imported using its namespace and name, e.g. diff --git a/templates/resources/secret_v1.md.tmpl b/templates/resources/secret_v1.md.tmpl index b05d72e8dc..12645cdfc9 100644 --- a/templates/resources/secret_v1.md.tmpl +++ b/templates/resources/secret_v1.md.tmpl @@ -5,18 +5,16 @@ description: |- The resource provides mechanisms to inject containers with sensitive information while keeping containers agnostic of Kubernetes. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_secret_v1 - -The resource provides mechanisms to inject containers with sensitive information, such as passwords, while keeping containers agnostic of Kubernetes. Secrets can be used to store sensitive information either as individual properties or coarse-grained entries like entire files or JSON blobs. The resource will by default create a secret which is available to any pod in the specified (or default) namespace. +{{ .Description }} ~> Read more about security properties and risks involved with using Kubernetes secrets: [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/secret/#information-security-for-secrets) ~> **Note:** All arguments including the secret data will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/secret_v1/example_1.tf"}} @@ -41,47 +39,6 @@ $ kubectl create secret docker-registry docker-cfg --docker-server=${registry_se {{tffile "examples/resources/secret_v1/example_4.tf"}} -## Argument Reference - -The following arguments are supported: - -* `data` - (Optional) A map of the secret data. -* `binary_data` - (Optional) A map base64 encoded map of the secret data. -* `metadata` - (Required) Standard secret's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `type` - (Optional) The secret type. Defaults to `Opaque`. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/c7151dd8dd7e487e96e5ce34c6a416bb3b037609/contributors/design-proposals/auth/secrets.md#proposed-design) -* `immutable` - (Optional) Ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. -* `wait_for_service_account_token` - (Optional) Terraform will wait for the service account token to be created. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the secret that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the secret. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the secret, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the secret must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this secret that can be used by clients to determine when secret has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this secret. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### Timeouts - -`kubernetes_secret_v1` provides the following configuration options: - -- `create` - Default `1 minute` - ## Import Secret can be imported using its namespace and name, e.g. diff --git a/templates/resources/service.md.tmpl b/templates/resources/service.md.tmpl index 48b737f803..656d47caac 100644 --- a/templates/resources/service.md.tmpl +++ b/templates/resources/service.md.tmpl @@ -5,14 +5,12 @@ description: |- A Service is an abstraction which defines a logical set of pods and a policy by which to access them - sometimes called a micro-service. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_service +# {{ .Name }} A Service is an abstraction which defines a logical set of pods and a policy by which to access them - sometimes called a micro-service. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/service/example_1.tf"}} @@ -21,114 +19,6 @@ A Service is an abstraction which defines a logical set of pods and a policy by {{tffile "examples/resources/service/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard service's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the behavior of a service. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the service that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `allocate_load_balancer_node_ports` - (Optional) Defines if `NodePorts` will be automatically allocated for services with type `LoadBalancer`. It may be set to `false` if the cluster load-balancer does not rely on `NodePorts`. If the caller requests specific `NodePorts` (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type `LoadBalancer`. Default is `true`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation) -* `cluster_ip` - (Optional) The IP address of the service. It is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. `None` can be specified for headless services when proxying is not required. Ignored if type is `ExternalName`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `cluster_ips` - (Optional) List of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise creation of the service will fail. If this field is not specified, it will be initialized from the `clusterIP` field. If this field is specified, clients must ensure that `clusterIPs[0]` and `clusterIP` have the same value. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `external_ips` - (Optional) A list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. -* `external_name` - (Optional) The external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires `type` to be `ExternalName`. -* `external_traffic_policy` - (Optional) Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. `Local` preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. `Cluster` obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. For more info see [Kubernetes reference](https://kubernetes.io/docs/tutorials/services/source-ip/) -* `ip_families` - (Optional) A list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the `ip_family_policy` field. If this field is specified manually, the requested family is available in the cluster, and `ip_family_policy` allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dual-stack/) -* `ip_family_policy` - (Optional) Represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to `SingleStack`. Services can be `SingleStack`(a single IP family), `PreferDualStack`(two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or `RequireDualStack`(two IP families on dual-stack configured clusters, otherwise fail). The `ip_families` and `cluster_ip` fields depend on the value of this field. -* `internal_traffic_policy` - (Optional) Specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. `Cluster` routes internal traffic to a Service to all endpoints. `Local` routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is `Cluster`. -* `load_balancer_class` - (Optional) The class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix. This field can only be set when the Service type is `LoadBalancer`. If not set, the default load balancer implementation is used. This field can only be set when creating or updating a Service to type `LoadBalancer`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class) -* `load_balancer_ip` - (Optional) Only applies to `type = LoadBalancer`. LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying this field when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. -* `load_balancer_source_ranges` - (Optional) If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/). -* `port` - (Optional) The list of ports that are exposed by this service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `publish_not_ready_addresses` - (Optional) When set to true, indicates that DNS implementations must publish the `notReadyAddresses` of subsets for the Endpoints associated with the Service. The default value is `false`. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate `SRV` records for its Pods without respect to their readiness for purpose of peer discovery. -* `selector` - (Optional) Route service traffic to pods with label keys and values matching this selector. Only applies to types `ClusterIP`, `NodePort`, and `LoadBalancer`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/) -* `session_affinity` - (Optional) Used to maintain session affinity. Supports `ClientIP` and `None`. Defaults to `None`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `session_affinity_config` - (Optional) Contains the configurations of session affinity. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs) -* `type` - (Optional) Determines how the service is exposed. Defaults to `ClusterIP`. Valid options are `ExternalName`, `ClusterIP`, `NodePort`, and `LoadBalancer`. `ExternalName` maps to the specified `external_name`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) -* `health_check_node_port` - (Optional) Specifies the Healthcheck NodePort for the service. Only effects when type is set to `LoadBalancer` and external_traffic_policy is set to `Local`. - -### `port` - -#### Arguments - -* `app_protocol` - (Optional) The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per [RFC-6335](https://datatracker.ietf.org/doc/html/rfc6335) and [IANA standard service names](https://www.iana.org/assignments/service-names)). Non-standard protocols should use prefixed names such as `mycompany.com/my-custom-protocol`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#application-protocol) -* `name` - (Optional) The name of this port within the service. All ports within the service must have unique names. Optional if only one ServicePort is defined on this service. -* `node_port` - (Optional) The port on each node on which this service is exposed when `type` is `NodePort` or `LoadBalancer`. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the `type` of this service requires one. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) -* `port` - (Required) The port that will be exposed by this service. -* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. -* `target_port` - (Optional) Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. This field is ignored for services with `cluster_ip = "None"`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service) - -### `session_affinity_config` - -#### Arguments - -* `client_ip` - (Optional) Contains the configurations of Client IP based session affinity. - -### `client_ip` - -#### Arguments - -* `timeout_seconds` - (Optional) Specifies the seconds of `ClientIP` type session sticky time. The value must be > 0 and <= 86400(for 1 day) if ServiceAffinity == `ClientIP`. - -## Attributes - -* `status` - Status is a list containing the most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -### `status` - -#### Attributes - -* `load_balancer` - a list containing the current status of the load-balancer, if one is present. - -### `load_balancer` - -#### Attributes - -* `ingress` - a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - -### `ingress` - -#### Attributes - -* `ip` - IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers). -* `hostname` - Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers). - -### Timeouts - -`kubernetes_service` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - -- `create` - Default `10 minutes` - ## Import Service can be imported using its namespace and name, e.g. diff --git a/templates/resources/service_account.md.tmpl b/templates/resources/service_account.md.tmpl index 0d57804582..6e8696d122 100644 --- a/templates/resources/service_account.md.tmpl +++ b/templates/resources/service_account.md.tmpl @@ -5,73 +5,18 @@ description: |- A service account provides an identity for processes that run in a Pod. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_service_account +# {{ .Name }} A service account provides an identity for processes that run in a Pod. Read more at [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/service_account/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard service account's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `image_pull_secret` - (Optional) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `secret` - (Optional) A list of secrets allowed to be used by pods running using this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/secret) -* `automount_service_account_token` - (Optional) Boolean, `true` to enable automatic mounting of the service account token. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the service account, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the service account must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `image_pull_secret` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `secret` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are exported: - -* `default_secret_name` - (Deprecated) Name of the default secret, containing service account token, created & managed by the service. By default, the provider will try to find the secret containing the service account token that Kubernetes automatically created for the service account. Where there are multiple tokens and the provider cannot determine which was created by Kubernetes, this attribute will be empty. When only one token is associated with the service account, the provider will return this single token secret. - - Starting from version `1.24.0` by default Kubernetes does not automatically generate tokens for service accounts. That leads to the situation when `default_secret_name` cannot be computed and thus will be an empty string. In order to create a service account token, please [use `kubernetes_secret_v1` resource](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret_v1#example-usage-service-account-token) - ## Import Service account can be imported using the namespace and name, e.g. diff --git a/templates/resources/service_account_v1.md.tmpl b/templates/resources/service_account_v1.md.tmpl index 1a04a667da..f42ccafb83 100644 --- a/templates/resources/service_account_v1.md.tmpl +++ b/templates/resources/service_account_v1.md.tmpl @@ -5,73 +5,16 @@ description: |- A service account provides an identity for processes that run in a Pod. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_service_account_v1 - -A service account provides an identity for processes that run in a Pod. - -Read more at [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/service_account_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard service account's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `image_pull_secret` - (Optional) A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) -* `secret` - (Optional) A list of secrets allowed to be used by pods running using this Service Account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/configuration/secret) -* `automount_service_account_token` - (Optional) Boolean, `true` to enable automatic mounting of the service account token. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the service account that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service account. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the service account, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the service account must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service account that can be used by clients to determine when service account has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service account. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `image_pull_secret` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `secret` - -#### Arguments - -* `name` - (Optional) Name of the referent. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are exported: - -* `default_secret_name` - (Deprecated) Name of the default secret, containing service account token, created & managed by the service. By default, the provider will try to find the secret containing the service account token that Kubernetes automatically created for the service account. Where there are multiple tokens and the provider cannot determine which was created by Kubernetes, this attribute will be empty. When only one token is associated with the service account, the provider will return this single token secret. - - Starting from version `1.24.0` by default Kubernetes does not automatically generate tokens for service accounts. That leads to the situation when `default_secret_name` cannot be computed and thus will be an empty string. In order to create a service account token, please [use `kubernetes_secret_v1` resource](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret_v1#example-usage-service-account-token) - ## Import Service account can be imported using the namespace and name, e.g. diff --git a/templates/resources/service_v1.md.tmpl b/templates/resources/service_v1.md.tmpl index edf32541b0..b9444682cc 100644 --- a/templates/resources/service_v1.md.tmpl +++ b/templates/resources/service_v1.md.tmpl @@ -5,13 +5,11 @@ description: |- A Service is an abstraction which defines a logical set of pods and a policy by which to access them - sometimes called a micro-service. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_service_v1 - -A Service is an abstraction which defines a logical set of pods and a policy by which to access them - sometimes called a micro-service. +{{ .SchemaMarkdown }} ## Example Usage @@ -21,114 +19,6 @@ A Service is an abstraction which defines a logical set of pods and a policy by {{tffile "examples/resources/service_v1/example_2.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard service's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the behavior of a service. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_load_balancer` - (Optional) Terraform will wait for the load balancer to have at least 1 endpoint before considering the resource created. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the service that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the service. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the service, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the service must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this service that can be used by clients to determine when service has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `allocate_load_balancer_node_ports` - (Optional) Defines if `NodePorts` will be automatically allocated for services with type `LoadBalancer`. It may be set to `false` if the cluster load-balancer does not rely on `NodePorts`. If the caller requests specific `NodePorts` (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type `LoadBalancer`. Default is `true`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation) -* `cluster_ip` - (Optional) The IP address of the service. It is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. `None` can be specified for headless services when proxying is not required. Ignored if type is `ExternalName`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `cluster_ips` - (Optional) List of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise creation of the service will fail. If this field is not specified, it will be initialized from the `clusterIP` field. If this field is specified, clients must ensure that `clusterIPs[0]` and `clusterIP` have the same value. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `external_ips` - (Optional) A list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. -* `external_name` - (Optional) The external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires `type` to be `ExternalName`. -* `external_traffic_policy` - (Optional) Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. `Local` preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. `Cluster` obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. For more info see [Kubernetes reference](https://kubernetes.io/docs/tutorials/services/source-ip/) -* `ip_families` - (Optional) A list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the `ip_family_policy` field. If this field is specified manually, the requested family is available in the cluster, and `ip_family_policy` allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/dual-stack/) -* `ip_family_policy` - (Optional) Represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to `SingleStack`. Services can be `SingleStack`(a single IP family), `PreferDualStack`(two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or `RequireDualStack`(two IP families on dual-stack configured clusters, otherwise fail). The `ip_families` and `cluster_ip` fields depend on the value of this field. -* `internal_traffic_policy` - (Optional) Specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. `Cluster` routes internal traffic to a Service to all endpoints. `Local` routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is `Cluster`. -* `load_balancer_class` - (Optional) The class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix. This field can only be set when the Service type is `LoadBalancer`. If not set, the default load balancer implementation is used. This field can only be set when creating or updating a Service to type `LoadBalancer`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class) -* `load_balancer_ip` - (Optional) Only applies to `type = LoadBalancer`. LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying this field when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. -* `load_balancer_source_ranges` - (Optional) If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature. For more info see [Kubernetes reference](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/). -* `port` - (Optional) The list of ports that are exposed by this service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `publish_not_ready_addresses` - (Optional) When set to true, indicates that DNS implementations must publish the `notReadyAddresses` of subsets for the Endpoints associated with the Service. The default value is `false`. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate `SRV` records for its Pods without respect to their readiness for purpose of peer discovery. -* `selector` - (Optional) Route service traffic to pods with label keys and values matching this selector. Only applies to types `ClusterIP`, `NodePort`, and `LoadBalancer`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/) -* `session_affinity` - (Optional) Used to maintain session affinity. Supports `ClientIP` and `None`. Defaults to `None`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) -* `session_affinity_config` - (Optional) Contains the configurations of session affinity. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs) -* `type` - (Optional) Determines how the service is exposed. Defaults to `ClusterIP`. Valid options are `ExternalName`, `ClusterIP`, `NodePort`, and `LoadBalancer`. `ExternalName` maps to the specified `external_name`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) -* `health_check_node_port` - (Optional) Specifies the Healthcheck NodePort for the service. Only effects when type is set to `LoadBalancer` and external_traffic_policy is set to `Local`. - -### `port` - -#### Arguments - -* `app_protocol` - (Optional) The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per [RFC-6335](https://datatracker.ietf.org/doc/html/rfc6335) and [IANA standard service names](http://www.iana.org/assignments/service-names)). Non-standard protocols should use prefixed names such as `mycompany.com/my-custom-protocol`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#application-protocol) -* `name` - (Optional) The name of this port within the service. All ports within the service must have unique names. Optional if only one ServicePort is defined on this service. -* `node_port` - (Optional) The port on each node on which this service is exposed when `type` is `NodePort` or `LoadBalancer`. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the `type` of this service requires one. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) -* `port` - (Required) The port that will be exposed by this service. -* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`. -* `target_port` - (Optional) Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. This field is ignored for services with `cluster_ip = "None"`. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service) - -### `session_affinity_config` - -#### Arguments - -* `client_ip` - (Optional) Contains the configurations of Client IP based session affinity. - -### `client_ip` - -#### Arguments - -* `timeout_seconds` - (Optional) Specifies the seconds of `ClientIP` type session sticky time. The value must be > 0 and <= 86400(for 1 day) if ServiceAffinity == `ClientIP`. - -## Attributes - -* `status` - Status is a list containing the most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - -### `status` - -#### Attributes - -* `load_balancer` - a list containing the current status of the load-balancer, if one is present. - -### `load_balancer` - -#### Attributes - -* `ingress` - a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - -### `ingress` - -#### Attributes - -* `ip` - IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers). -* `hostname` - Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers). - -### Timeouts - -`kubernetes_service_v1` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - -- `create` - Default `10 minutes` - ## Import Service can be imported using its namespace and name, e.g. diff --git a/templates/resources/stateful_set.md.tmpl b/templates/resources/stateful_set.md.tmpl index 58b7ad2016..5c5d90b637 100644 --- a/templates/resources/stateful_set.md.tmpl +++ b/templates/resources/stateful_set.md.tmpl @@ -5,11 +5,7 @@ description: |- StatefulSet is a Kubernetes resource used to manage stateful applications. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_stateful_set +# {{ .Name }} Manages the deployment and scaling of a set of Pods , and provides guarantees about the ordering and uniqueness of these Pods. @@ -17,141 +13,12 @@ Like a Deployment , a StatefulSet manages Pods that are based on an identical co A StatefulSet operates under the same pattern as any other Controller. You define your desired state in a StatefulSet object, and the StatefulSet controller makes any necessary updates to get there from the current state. +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/stateful_set/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Kubernetes object metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the stateful set. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the StatefulSet to finish rolling out. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the stateful set that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the stateful set. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the stateful set, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the stateful set must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this stateful set that can be used by clients to determine when stateful set has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this stateful set. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `pod_management_policy` - (Optional) podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. *Changing this forces a new resource to be created.* - -* `replicas` - (Optional) The desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. This attribute is a string to be able to distinguish between explicit zero and not specified. - -* `revision_history_limit` - (Optional) The maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. *Changing this forces a new resource to be created.* - -* `selector` - (Required) A label query over pods that should match the replica count. **It must match the pod template's labels.** *Changing this forces a new resource to be created.* More info: [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) - -* `service_name` - (Required) The name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. *Changing this forces a new resource to be created.* - -* `template` - (Required) The object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. - -* `update_strategy` - (Optional) Indicates the StatefulSet update strategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - -* `volume_claim_template` - (Optional) A list of volume claims that pods are allowed to reference. A claim in this list takes precedence over any volumes in the template, with the same name. *Changing this forces a new resource to be created.* - -* `persistent_volume_claim_retention_policy` - (Optional) The object controls if and how PVCs are deleted during the lifecycle of a StatefulSet. - -## Nested Blocks - -### `spec.template` - -#### Arguments - -* `metadata` - (Required) Standard object's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - -* `spec` - (Optional) Specification of the desired behavior of the pod. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status). - -## Nested Blocks - -### `spec.template.metadata` - -#### Arguments - -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: - -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. - -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. - -Please see the [Pod resource](pod_v1.html#metadata) for reference. - -### `spec.template.spec` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod_v1.html#spec) for reference. - -## Nested Blocks - -### `spec.update_strategy` - -#### Arguments - -* `type` - (Optional) Indicates the type of the StatefulSetUpdateStrategy. There are two valid update strategies, RollingUpdate and OnDelete. Default is `RollingUpdate`. - -* `rolling_update` - (Optional) The RollingUpdate update strategy will update all Pods in a StatefulSet, in reverse ordinal order, while respecting the StatefulSet guarantees. - -### `spec.update_strategy.rolling_update` - -#### Arguments - -* `partition` - (Optional) Indicates the ordinal at which the StatefulSet should be partitioned. You can perform a phased roll out (e.g. a linear, geometric, or exponential roll out) using a partitioned rolling update in a similar manner to how you rolled out a canary. To perform a phased roll out, set the partition to the ordinal at which you want the controller to pause the update. By setting the partition to 0, you allow the StatefulSet controller to continue the update process. Default value is `0`. - -## Nested Blocks - -### `spec.volume_claim_template` - -One or more `volume_claim_template` blocks can be specified. - -#### Arguments - -Each takes the same attibutes as a `kubernetes_persistent_volume_claim` resource. - -Please see its [documentation](persistent_volume_claim.html#argument-reference) for reference. - -### `spec.persistent_volume_claim_retention_policy` - -#### Arguments - -* `when_deleted` - (Optional) This field controls what happens when a Statefulset is deleted. Default is Retain. - -* `when_scaled` - (Optional) This field controls what happens when a Statefulset is scaled. Default is Retain. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_stateful_set` resource: - -* `create` - (Default `10 minutes`) Used for creating new StatefulSet -* `read` - (Default `10 minutes`) Used for reading a StatefulSet -* `update` - (Default `10 minutes`) Used for updating a StatefulSet -* `delete` - (Default `10 minutes`) Used for destroying a StatefulSet - ## Import kubernetes_stateful_set can be imported using its namespace and name, e.g. diff --git a/templates/resources/stateful_set_v1.md.tmpl b/templates/resources/stateful_set_v1.md.tmpl index bb2746434e..386d134472 100644 --- a/templates/resources/stateful_set_v1.md.tmpl +++ b/templates/resources/stateful_set_v1.md.tmpl @@ -5,153 +5,16 @@ description: |- StatefulSet is a Kubernetes resource used to manage stateful applications. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_stateful_set_v1 - -Manages the deployment and scaling of a set of Pods , and provides guarantees about the ordering and uniqueness of these Pods. - -Like a Deployment , a StatefulSet manages Pods that are based on an identical container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. These pods are created from the same spec, but are not interchangeable: each has a persistent identifier that it maintains across any rescheduling. - -A StatefulSet operates under the same pattern as any other Controller. You define your desired state in a StatefulSet object, and the StatefulSet controller makes any necessary updates to get there from the current state. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/stateful_set_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Kubernetes object metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec defines the specification of the desired behavior of the stateful set. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) -* `wait_for_rollout` - (Optional) Wait for the StatefulSet to finish rolling out. Defaults to `true`. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the stateful set that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the stateful set. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the stateful set, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the stateful set must be unique. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this stateful set that can be used by clients to determine when stateful set has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this stateful set. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `spec` - -#### Arguments - -* `pod_management_policy` - (Optional) podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. *Changing this forces a new resource to be created.* - -* `replicas` - (Optional) The desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. This attribute is a string to be able to distinguish between explicit zero and not specified. - -* `revision_history_limit` - (Optional) The maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. *Changing this forces a new resource to be created.* - -* `selector` - (Required) A label query over pods that should match the replica count. **It must match the pod template's labels.** *Changing this forces a new resource to be created.* More info: [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) - -* `service_name` - (Required) The name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. *Changing this forces a new resource to be created.* - -* `template` - (Required) The object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. - -* `update_strategy` - (Optional) Indicates the StatefulSet update strategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - -* `volume_claim_template` - (Optional) A list of volume claims that pods are allowed to reference. A claim in this list takes precedence over any volumes in the template, with the same name. *Changing this forces a new resource to be created.* - -* `persistent_volume_claim_retention_policy` - (Optional) The object controls if and how PVCs are deleted during the lifecycle of a StatefulSet. - -## Nested Blocks - -### `spec.template` - -#### Arguments - -* `metadata` - (Required) Standard object's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata). - -* `spec` - (Optional) Specification of the desired behavior of the pod. For more info see [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status). - -## Nested Blocks - -### `spec.template.metadata` - -#### Arguments - -These arguments are the same as the for the `metadata` block of a Pod with a few exceptions: - -* When `spec.template.metadata.namespace` does not have a default value, it is empty if not set. - -* The `spec.template.metadata.namespace` is a stub field that does not affect the namespace in which the Pod will be created. The Pod will be created in the same namespace as the main resource. However, modifying this field will force the resource recreation. - -Please see the [Pod resource](pod_v1.html#metadata) for reference. - -### `spec.template.spec` - -#### Arguments - -These arguments are the same as the for the `spec` block of a Pod. - -Please see the [Pod resource](pod_v1.html#spec) for reference. - -## Nested Blocks - -### `spec.update_strategy` - -#### Arguments - -* `type` - (Optional) Indicates the type of the StatefulSetUpdateStrategy. There are two valid update strategies, RollingUpdate and OnDelete. Default is `RollingUpdate`. - -* `rolling_update` - (Optional) The RollingUpdate update strategy will update all Pods in a StatefulSet, in reverse ordinal order, while respecting the StatefulSet guarantees. - -### `spec.update_strategy.rolling_update` - -#### Arguments - -* `partition` - (Optional) Indicates the ordinal at which the StatefulSet should be partitioned. You can perform a phased roll out (e.g. a linear, geometric, or exponential roll out) using a partitioned rolling update in a similar manner to how you rolled out a canary. To perform a phased roll out, set the partition to the ordinal at which you want the controller to pause the update. By setting the partition to 0, you allow the StatefulSet controller to continue the update process. Default value is `0`. - -## Nested Blocks - -### `spec.volume_claim_template` - -One or more `volume_claim_template` blocks can be specified. - -#### Arguments - -Each takes the same attibutes as a `kubernetes_persistent_volume_claim_v1` resource. - -Please see its [documentation](persistent_volume_claim_v1.html#argument-reference) for reference. - -### `spec.persistent_volume_claim_retention_policy` - -#### Arguments - -* `when_deleted` - (Optional) This field controls what happens when a Statefulset is deleted. Default is Retain. - -* `when_scaled` - (Optional) This field controls what happens when a Statefulset is scaled. Default is Retain. - -## Timeouts - -The following [Timeout](/docs/configuration/resources.html#operation-timeouts) configuration options are available for the `kubernetes_stateful_set_v1` resource: - -* `create` - (Default `10 minutes`) Used for creating new StatefulSet -* `read` - (Default `10 minutes`) Used for reading a StatefulSet -* `update` - (Default `10 minutes`) Used for updating a StatefulSet -* `delete` - (Default `10 minutes`) Used for destroying a StatefulSet - ## Import kubernetes_stateful_set_v1 can be imported using its namespace and name, e.g. diff --git a/templates/resources/storage_class.md.tmpl b/templates/resources/storage_class.md.tmpl index 1db60023c4..427c23626b 100644 --- a/templates/resources/storage_class.md.tmpl +++ b/templates/resources/storage_class.md.tmpl @@ -5,69 +5,18 @@ description: |- Storage class is the foundation of dynamic provisioning, allowing cluster administrators to define abstractions for the underlying storage platform. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_storage_class +# {{ .Name }} Storage class is the foundation of dynamic provisioning, allowing cluster administrators to define abstractions for the underlying storage platform. Read more at https://kubernetes.io/blog/2017/03/dynamic-provisioning-and-storage-classes-kubernetes/ +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/storage_class/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard storage class's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `parameters` - (Optional) The parameters for the provisioner that should create volumes of this storage class. Read more about [available parameters](https://kubernetes.io/docs/concepts/storage/storage-classes/#parameters). -* `storage_provisioner` - (Required) Indicates the type of the provisioner -* `reclaim_policy` - (Optional) Indicates the reclaim policy to use. If no reclaimPolicy is specified when a StorageClass object is created, it will default to Delete. -* `volume_binding_mode` - (Optional) Indicates when volume binding and dynamic provisioning should occur. -* `allow_volume_expansion` - (Optional) Indicates whether the storage class allow volume expand, default true. -* `mount_options` - (Optional) Persistent Volumes that are dynamically created by a storage class will have the mount options specified. -* `allowed_topologies` - (Optional) Restrict the node topologies where volumes can be dynamically provisioned. See [allowed_topologies](#allowed_topologies) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the storage class that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the storage class. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the storage class, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `allowed_topologies` - -#### Arguments - -* `match_label_expressions` - (Optional) A list of topology selector requirements by labels. See [match_label_expressions](#match_label_expressions) - -### `match_label_expressions` - -#### Arguments - -* `key` - (Optional) The label key that the selector applies to. -* `values` - (Optional) An array of string values. One value must match the label to be selected. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this storage class that can be used by clients to determine when storage class has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this storage class. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import kubernetes_storage_class can be imported using its name, e.g. diff --git a/templates/resources/storage_class_v1.md.tmpl b/templates/resources/storage_class_v1.md.tmpl index 39eff15518..63b5a231b0 100644 --- a/templates/resources/storage_class_v1.md.tmpl +++ b/templates/resources/storage_class_v1.md.tmpl @@ -5,69 +5,16 @@ description: |- Storage class is the foundation of dynamic provisioning, allowing cluster administrators to define abstractions for the underlying storage platform. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_storage_class_v1 - -Storage class is the foundation of dynamic provisioning, allowing cluster administrators to define abstractions for the underlying storage platform. - -Read more at https://kubernetes.io/blog/2017/03/dynamic-provisioning-and-storage-classes-kubernetes/ +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/storage_class_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard storage class's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `parameters` - (Optional) The parameters for the provisioner that should create volumes of this storage class. Read more about [available parameters](https://kubernetes.io/docs/concepts/storage/storage-classes/#parameters). -* `storage_provisioner` - (Required) Indicates the type of the provisioner -* `reclaim_policy` - (Optional) Indicates the reclaim policy to use. If no reclaimPolicy is specified when a StorageClass object is created, it will default to Delete. -* `volume_binding_mode` - (Optional) Indicates when volume binding and dynamic provisioning should occur. -* `allow_volume_expansion` - (Optional) Indicates whether the storage class allow volume expand, default true. -* `mount_options` - (Optional) Persistent Volumes that are dynamically created by a storage class will have the mount options specified. -* `allowed_topologies` - (Optional) Restrict the node topologies where volumes can be dynamically provisioned. See [allowed_topologies](#allowed_topologies) - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the storage class that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the storage class. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the storage class, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -### `allowed_topologies` - -#### Arguments - -* `match_label_expressions` - (Optional) A list of topology selector requirements by labels. See [match_label_expressions](#match_label_expressions) - -### `match_label_expressions` - -#### Arguments - -* `key` - (Optional) The label key that the selector applies to. -* `values` - (Optional) An array of string values. One value must match the label to be selected. - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this storage class that can be used by clients to determine when storage class has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this storage class. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - ## Import kubernetes_storage_class_v1 can be imported using its name, e.g. diff --git a/templates/resources/token_request_v1.md.tmpl b/templates/resources/token_request_v1.md.tmpl index 4df6d92ba8..8d7275c0d5 100644 --- a/templates/resources/token_request_v1.md.tmpl +++ b/templates/resources/token_request_v1.md.tmpl @@ -5,60 +5,13 @@ description: |- TokenRequest requests a token for a given service account. --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_token_request_v1 - -TokenRequest requests a token for a given service account. +{{ .SchemaMarkdown }} ## Example Usage {{tffile "examples/resources/token_request_v1/example_1.tf"}} -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard role's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `spec` - (Required) Spec holds information about the request being evaluated - -### Attributes - -* `token` - Token is the opaque bearer token. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the role that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](hhttps://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the role. **Must match `selector`**. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the role, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) -* `namespace` - (Optional) Namespace defines the space within which name of the role must be unique. - -### `spec` - -#### Arguments - -* `audiences` - (Optional) Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences. -* `expiration_seconds` - (Optional) ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response. -* `bound_object_ref` - (Optional) BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation. - -### `bound_object_ref` - -#### Arguments - -* `api_version` - (Optional) API version of the referent. -* `kind` - (Optional) Kind of the referent. Valid kinds are 'Pod' and 'Secret'. -* `name` - (Optional) Name of the referent. -* `uid` - (Optional) UID of the referent. diff --git a/templates/resources/validating_webhook_configuration.md.tmpl b/templates/resources/validating_webhook_configuration.md.tmpl index 0e32a4e922..40b4535a9a 100644 --- a/templates/resources/validating_webhook_configuration.md.tmpl +++ b/templates/resources/validating_webhook_configuration.md.tmpl @@ -5,14 +5,12 @@ description: |- Validating Webhook Configuration configures a validating admission webhook --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. - -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} - -# kubernetes_validating_webhook_configuration +# {{ .Name }} Validating Webhook Configuration configures a [validating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks). +{{ .SchemaMarkdown }} + ## Example Usage {{tffile "examples/resources/validating_webhook_configuration/example_1.tf"}} @@ -21,79 +19,7 @@ Validating Webhook Configuration configures a [validating admission webhook](htt The provider supports clusters running either `v1` or `v1beta1` of the Admission Registration API. -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Validating Webhook Configuration metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `webhook` - (Required) A list of webhooks and the affected resources and operations. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Validating Webhook Configuration that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Validating Webhook Configuration. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Validating Webhook Configuration, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Validating Webhook Configuration that can be used by clients to determine when Validating Webhook Configuration has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Validating Webhook Configuration. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `webhook` - -#### Arguments - -* `admission_review_versions` - (Optional) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list are supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. -* `client_config` - (Required) ClientConfig defines how to communicate with the hook. -* `failure_policy` - (Optional) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - Allowed values are "Ignore" or "Fail". Defaults to "Fail". -* `match_policy` - (Optional) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to "Equivalent" -* `name` - (Required) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. -* `namespace_selector` - (Optional) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator": "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "environment", "operator": "In", "values": [ "prod", "staging" ] } ] } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. Default to the empty LabelSelector, which matches everything. -* `object_selector` - (Optional) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. -* `rule` - (Optional) Describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches *any* Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. -* `side_effects` - (Required) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. -* `timeout_seconds` - (Optional) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. - -### `client_config` - -#### Arguments - -* `ca_bundle` - (Optional) A PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. -* `service` - (Optional) A reference to the service for this webhook. Either `service` or `url` must be specified. If the webhook is running within the cluster, then you should use `service`. -* `url` - (Optional) Gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be "https"; the URL must begin with "https://". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. - -### `service` - -#### Arguments - -* `name` - (Required) The name of the service. -* `namespace` - (Required) The namespace of the service. -* `path` - (Optional) The URL path which will be sent in any request to this service. -* `port` - (Optional) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). - -### `rule` - -#### Arguments - -* `api_groups` - (Required) The API groups the resources belong to. '\*' is all groups. If '\*' is present, the length of the list must be one. -* `api_versions` - (Required) The API versions the resources belong to. '\*' is all versions. If '\*' is present, the length of the list must be one. -* `operations` - (Required) The operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '\*' is present, the length of the list must be one. -* `resources` - (Required) A list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '\*' means all resources, but not subresources. 'pods/\*' means all subresources of pods. '\*/scale' means all scale subresources. '\*/\*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. -* `scope` - (Optional) Specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". - -## Import +##Import Validating Webhook Configuration can be imported using the name, e.g. diff --git a/templates/resources/validating_webhook_configuration_v1.md.tmpl b/templates/resources/validating_webhook_configuration_v1.md.tmpl index 6c34849ef5..62cc8ba554 100644 --- a/templates/resources/validating_webhook_configuration_v1.md.tmpl +++ b/templates/resources/validating_webhook_configuration_v1.md.tmpl @@ -5,13 +5,11 @@ description: |- Validating Webhook Configuration configures a validating admission webhook --- -{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. +# {{ .Name }} -For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} +{{ .Description }} -# kubernetes_validating_webhook_configuration_v1 - -Validating Webhook Configuration configures a [validating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks). +{{ .SchemaMarkdown }} ## Example Usage @@ -21,78 +19,6 @@ Validating Webhook Configuration configures a [validating admission webhook](htt The provider supports clusters running either `v1` or `v1beta1` of the Admission Registration API. -## Argument Reference - -The following arguments are supported: - -* `metadata` - (Required) Standard Validating Webhook Configuration metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata) -* `webhook` - (Required) A list of webhooks and the affected resources and operations. - -## Nested Blocks - -### `metadata` - -#### Arguments - -* `annotations` - (Optional) An unstructured key value map stored with the Validating Webhook Configuration that may be used to store arbitrary metadata. - -~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - -* `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency) -* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the Validating Webhook Configuration. May match selectors of replication controllers and services. - -~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - -* `name` - (Optional) Name of the Validating Webhook Configuration, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) - -#### Attributes - -* `generation` - A sequence number representing a specific generation of the desired state. -* `resource_version` - An opaque value that represents the internal version of this Validating Webhook Configuration that can be used by clients to determine when Validating Webhook Configuration has changed. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency) -* `uid` - The unique in time and space value for this Validating Webhook Configuration. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids) - -### `webhook` - -#### Arguments - -* `admission_review_versions` - (Optional) AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list are supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. -* `client_config` - (Required) ClientConfig defines how to communicate with the hook. -* `failure_policy` - (Optional) FailurePolicy defines how unrecognized errors from the admission endpoint are handled - Allowed values are "Ignore" or "Fail". Defaults to "Fail". -* `match_policy` - (Optional) matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to "Equivalent" -* `name` - (Required) The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. -* `namespace_selector` - (Optional) NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator": "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "environment", "operator": "In", "values": [ "prod", "staging" ] } ] } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. Default to the empty LabelSelector, which matches everything. -* `object_selector` - (Optional) ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. -* `rule` - (Optional) Describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches *any* Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. -* `side_effects` - (Required) SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. -* `timeout_seconds` - (Optional) TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. - -### `client_config` - -#### Arguments - -* `ca_bundle` - (Optional) A PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. -* `service` - (Optional) A reference to the service for this webhook. Either `service` or `url` must be specified. If the webhook is running within the cluster, then you should use `service`. -* `url` - (Optional) Gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be "https"; the URL must begin with "https://". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. - -### `service` - -#### Arguments - -* `name` - (Required) The name of the service. -* `namespace` - (Required) The namespace of the service. -* `path` - (Optional) The URL path which will be sent in any request to this service. -* `port` - (Optional) If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). - -### `rule` - -#### Arguments - -* `api_groups` - (Required) The API groups the resources belong to. '\*' is all groups. If '\*' is present, the length of the list must be one. -* `api_versions` - (Required) The API versions the resources belong to. '\*' is all versions. If '\*' is present, the length of the list must be one. -* `operations` - (Required) The operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '\*' is present, the length of the list must be one. -* `resources` - (Required) A list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '\*' means all resources, but not subresources. 'pods/\*' means all subresources of pods. '\*/scale' means all scale subresources. '\*/\*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. -* `scope` - (Optional) Specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". - ## Import Validating Webhook Configuration can be imported using the name, e.g.