From 27608ca428193a6773954dd4f797f450863c7144 Mon Sep 17 00:00:00 2001 From: "sheneska.williams" Date: Mon, 22 Jul 2024 17:26:00 -0400 Subject: [PATCH] Add ipMode field --- docs/data-sources/config_map_v1.md | 1 + docs/data-sources/pod.md | 6 ------ docs/data-sources/pod_v1.md | 6 ------ ...n-guide.md => alpha-manifest-migration-guide.markdown} | 2 +- ...ting-started.html.md => getting-started.html.markdown} | 2 +- .../{v2-upgrade-guide.md => v2-upgrade-guide.markdown} | 2 +- ...ersioned-resources.md => versioned-resources.markdown} | 2 +- docs/index.md | 8 ++++---- docs/resources/cron_job.md | 2 +- docs/resources/network_policy.md | 3 ++- docs/resources/network_policy_v1.md | 4 ++-- docs/resources/service.md | 1 + docs/resources/service_v1.md | 1 + kubernetes/resource_kubernetes_service_v1.go | 4 ++++ 14 files changed, 20 insertions(+), 24 deletions(-) rename docs/guides/{alpha-manifest-migration-guide.md => alpha-manifest-migration-guide.markdown} (99%) rename docs/guides/{getting-started.html.md => getting-started.html.markdown} (99%) rename docs/guides/{v2-upgrade-guide.md => v2-upgrade-guide.markdown} (99%) rename docs/guides/{versioned-resources.md => versioned-resources.markdown} (99%) diff --git a/docs/data-sources/config_map_v1.md b/docs/data-sources/config_map_v1.md index f98a9eed9c..9826bb35cb 100644 --- a/docs/data-sources/config_map_v1.md +++ b/docs/data-sources/config_map_v1.md @@ -45,6 +45,7 @@ Read-Only: + ~> **Note:** All arguments including the config map data will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). ## Example Usage diff --git a/docs/data-sources/pod.md b/docs/data-sources/pod.md index 96946e8752..bfc6ff1fec 100644 --- a/docs/data-sources/pod.md +++ b/docs/data-sources/pod.md @@ -1623,12 +1623,6 @@ Read-Only: -* `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`. - ### Nested Schema for `spec.volume.empty_dir` diff --git a/docs/data-sources/pod_v1.md b/docs/data-sources/pod_v1.md index 93199eb308..55bfa65ba4 100644 --- a/docs/data-sources/pod_v1.md +++ b/docs/data-sources/pod_v1.md @@ -1623,12 +1623,6 @@ Read-Only: -* `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`. - ### Nested Schema for `spec.volume.empty_dir` diff --git a/docs/guides/alpha-manifest-migration-guide.md b/docs/guides/alpha-manifest-migration-guide.markdown similarity index 99% rename from docs/guides/alpha-manifest-migration-guide.md rename to docs/guides/alpha-manifest-migration-guide.markdown index 6095226fd3..bc653387ab 100644 --- a/docs/guides/alpha-manifest-migration-guide.md +++ b/docs/guides/alpha-manifest-migration-guide.markdown @@ -1,5 +1,5 @@ --- -subcategory: "" +layout: "kubernetes" page_title: "Migrating `kubernetes_manifest` resources from the kubernetes-alpha provider" description: |- This guide covers adopting `kubernetes_manifest` resources created using the kubernetes-alpha provider. diff --git a/docs/guides/getting-started.html.md b/docs/guides/getting-started.html.markdown similarity index 99% rename from docs/guides/getting-started.html.md rename to docs/guides/getting-started.html.markdown index ba9171b9ff..c51dfb63e3 100644 --- a/docs/guides/getting-started.html.md +++ b/docs/guides/getting-started.html.markdown @@ -1,5 +1,5 @@ --- -subcategory: "" +layout: "kubernetes" page_title: "Kubernetes: Getting Started with Kubernetes provider" description: |- This guide focuses on configuring authentication to your existing Kubernetes diff --git a/docs/guides/v2-upgrade-guide.md b/docs/guides/v2-upgrade-guide.markdown similarity index 99% rename from docs/guides/v2-upgrade-guide.md rename to docs/guides/v2-upgrade-guide.markdown index a8dd0121ae..7b4203e411 100644 --- a/docs/guides/v2-upgrade-guide.md +++ b/docs/guides/v2-upgrade-guide.markdown @@ -1,5 +1,5 @@ --- -subcategory: "" +layout: "kubernetes" page_title: "Kubernetes: Upgrade Guide for Kubernetes Provider v2.0.0" description: |- This guide covers the changes introduced in v2.0.0 of the Kubernetes provider and what you may need to do to upgrade your configuration. diff --git a/docs/guides/versioned-resources.md b/docs/guides/versioned-resources.markdown similarity index 99% rename from docs/guides/versioned-resources.md rename to docs/guides/versioned-resources.markdown index a5ff0cde00..489b92361c 100644 --- a/docs/guides/versioned-resources.md +++ b/docs/guides/versioned-resources.markdown @@ -1,5 +1,5 @@ --- -subcategory: "" +layout: "kubernetes" page_title: "Versioned resource names" description: |- This guide explains the naming conventions for resources and data sources in the Kubernetes provider. diff --git a/docs/index.md b/docs/index.md index f126c0b1e2..f4ca19f1b9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -195,9 +195,9 @@ The following arguments are supported: * `token` - (Optional) Token of your service account. Can be sourced from `KUBE_TOKEN`. * `proxy_url` - (Optional) URL to the proxy to be used for all API requests. URLs with "http", "https", and "socks5" schemes are supported. Can be sourced from `KUBE_PROXY_URL`. * `exec` - (Optional) Configuration block to use an [exec-based credential plugin] (https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins), e.g. call an external command to receive user credentials. -* `api_version` - (Required) API version to use when decoding the ExecCredentials resource, e.g. `client.authentication.k8s.io/v1beta1`. -* `command` - (Required) Command to execute. -* `args` - (Optional) List of arguments to pass when executing the plugin. -* `env` - (Optional) Map of environment variables to set when executing the plugin. + * `api_version` - (Required) API version to use when decoding the ExecCredentials resource, e.g. `client.authentication.k8s.io/v1beta1`. + * `command` - (Required) Command to execute. + * `args` - (Optional) List of arguments to pass when executing the plugin. + * `env` - (Optional) Map of environment variables to set when executing the plugin. * `ignore_annotations` - (Optional) List of Kubernetes metadata annotations to ignore across all resources handled by this provider for situations where external systems are managing certain resource annotations. This option does not affect annotations within a template block. Each item is a regular expression. * `ignore_labels` - (Optional) List of Kubernetes metadata labels to ignore across all resources handled by this provider for situations where external systems are managing certain resource labels. This option does not affect annotations within a template block. Each item is a regular expression. diff --git a/docs/resources/cron_job.md b/docs/resources/cron_job.md index c8042befb6..87e7404ab6 100644 --- a/docs/resources/cron_job.md +++ b/docs/resources/cron_job.md @@ -2388,5 +2388,5 @@ resource "kubernetes_cron_job" "demo" { ## Import ``` -$ terraform import kubernetes_cron_job_v1/example default/example +$ terraform import kubernetes_corn_job_v1/example default/example ``` \ No newline at end of file diff --git a/docs/resources/network_policy.md b/docs/resources/network_policy.md index a87d5f0d5b..7d891ebb68 100644 --- a/docs/resources/network_policy.md +++ b/docs/resources/network_policy.md @@ -85,6 +85,7 @@ Optional: Optional: +- `end_port` (Number) endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. - `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. @@ -225,9 +226,9 @@ Optional: Optional: +- `end_port` (Number) endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. - `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. -- `end_port` - (Optional) The end_port indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. Cannot be defined if port is undefined or if port is defined as a named (string) port. diff --git a/docs/resources/network_policy_v1.md b/docs/resources/network_policy_v1.md index 3d54e7c5e0..a3907e57f5 100644 --- a/docs/resources/network_policy_v1.md +++ b/docs/resources/network_policy_v1.md @@ -85,6 +85,7 @@ Optional: Optional: +- `end_port` (Number) endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. - `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. @@ -225,9 +226,9 @@ Optional: Optional: +- `end_port` (Number) endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. - `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. -- `end_port` - (Optional) The end_port indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. Cannot be defined if port is undefined or if port is defined as a named (string) port. @@ -288,7 +289,6 @@ resource "kubernetes_network_policy_v1" "example" { } ``` - ## Import Network policies can be imported using their identifier consisting of `/`, e.g.: diff --git a/docs/resources/service.md b/docs/resources/service.md index b35b2ba51a..cf74f7d63e 100644 --- a/docs/resources/service.md +++ b/docs/resources/service.md @@ -132,6 +132,7 @@ Read-Only: - `hostname` (String) - `ip` (String) +- `ipMode` (String) diff --git a/docs/resources/service_v1.md b/docs/resources/service_v1.md index 006428ce48..1f1740912c 100644 --- a/docs/resources/service_v1.md +++ b/docs/resources/service_v1.md @@ -132,6 +132,7 @@ Read-Only: - `hostname` (String) - `ip` (String) +- `ipMode` (String) diff --git a/kubernetes/resource_kubernetes_service_v1.go b/kubernetes/resource_kubernetes_service_v1.go index 934f038082..f230fd0cb1 100644 --- a/kubernetes/resource_kubernetes_service_v1.go +++ b/kubernetes/resource_kubernetes_service_v1.go @@ -316,6 +316,10 @@ func resourceKubernetesServiceSchemaV1() map[string]*schema.Schema { Type: schema.TypeString, Computed: true, }, + "ipMode": { + Type: schema.TypeString, + Computed: true, + }, "hostname": { Type: schema.TypeString, Computed: true,