IssueRaiser

Feature Request: equivalent of `kubectl patch`

### Terraform Version Terraform v0.12.18 ### Affected Resource(s) n/a (request for new resource) In AWS EKS, clusters come "pre-configured" with several things running in the `kube-system` namespace. We need to patch those pre-configured things, while retaining any "upstream" changes which happen to be made. (for example: set HTTP_PROXY variables) kubectl provides the `patch` keyword to handle this use-case. The kubernetes provider for terraform should do the same. Proposed example (this would add the `proxy-environment-variables` ConfigMap to the existing `envFrom` list which already contains `aws-node-environment-variable-additions` for the container named `aws-node`): ``` resource "kubernetes_patch" "aws-node" { kind = daemonset metadata { name = "aws-node" namespace = "kube-system" } spec { template { spec { container { name = "aws-node" envFrom { [ configMapRef { name: proxy-environment-variables } configMapRef { name: aws-node-environment-variable-additions } ] } } } } } } ```

Posted by zapman449 on Jan 2, 2020, 8:02 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

github (Sysadmin)

Feature Request: equivalent of `kubectl patch`

zapman449Jan 2, 2020, 8:02 PM

### Terraform Version Terraform v0.12.18 ### Affected Resource(s) n/a (request for new resource) In AWS EKS, clusters come "pre-configured" with several things running in the `kube-system` namespace. We need to patch those pre-configured things, while retaining any "upstream" changes which happen to be made. (for example: set HTTP_PROXY variables) kubectl provides the `patch` keyword to handle this use-case. The kubernetes provider for terraform should do the same. Proposed example (this would add the `proxy-environment-variables` ConfigMap to the existing `envFrom` list which already contains `aws-node-environment-variable-additions` for the container named `aws-node`): ``` resource "kubernetes_patch" "aws-node" { kind = daemonset metadata { name = "aws-node" namespace = "kube-system" } spec { template { spec { container { name = "aws-node" envFrom { [ configMapRef { name: proxy-environment-variables } configMapRef { name: aws-node-environment-variable-additions } ] } } } } } } ```

Comments (0)

No comments yet. Start the discussion.

Comment on this issue