Skip to content

helm overwrite existing resources deployed by non-helm #10304

@kumarpmd

Description

@kumarpmd

Hi:
I have an EKS cluster created with Terraform and working to implement AWS Console RBAC in the cluster discussed here. As part of this process, I am able to deploy the Role, Binding using Helm Chart and patch aws-auth configmap using kubectl.

Deploying configmap using Helm complains the resource already exists and requires the configmap metadata fields (ownership,etc) to be set to helm values. Ideally would like helm to overwrite the resource, so we can start developing custom charts and use helm for cluster updates/deployments.

Can helm overwrite existing resources deployed by non-helm, or is there a workaround that should make this possible ?

Error:
Error: rendered manifests contain a resource that already exists. Unable to continue with install: ConfigMap "aws-auth" in namespace "kube-system" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: key "app.kubernetes.io/managed-by" must equal "Helm": current value is "Terraform"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "console-rbac"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "kube-system"

Output of helm version:
v3.5.3+g041ce5a

Output of kubectl version:
Client Version: v1.19.0
Server Version: v1.20.7-eks-d88609

Cloud Provider/Platform (AKS, GKE, Minikube etc.):
AWS EKS

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurehelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.in progress

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions