diff --git a/charts/aws-vpc-cni/README.md b/charts/aws-vpc-cni/README.md index 2fcb5668f3..0ddb65aa70 100644 --- a/charts/aws-vpc-cni/README.md +++ b/charts/aws-vpc-cni/README.md @@ -81,7 +81,7 @@ $ helm install --name aws-vpc-cni --namespace kube-system eks/aws-vpc-cni --valu ## Adopting the existing aws-node resources in an EKS cluster -If you do not want to delete the existing aws-node resources in your cluster that run the aws-vpc-cni and then install this helm chart, you can adopt the resources into a release instead. This process is highlighted in this [PR comment](https://github.com/aws/eks-charts/issues/57#issuecomment-628403245). Once you have annotated and labeled all the resources this chart specifies, enable the `originalMatchLabels` flag, and also set `crd.create` to false on the helm release and run an update. If you have been careful this should not diff and leave all the resources unmodified and now under management of helm. +If you do not want to delete the existing aws-node resources in your cluster that run the aws-vpc-cni and then install this helm chart, you can adopt the resources into a release instead. This process is highlighted in this [PR comment](https://github.com/aws/eks-charts/issues/57#issuecomment-628403245). Once you have annotated and labeled all the resources this chart specifies, enable the `originalMatchLabels` flag. If you have been careful this should not diff and leave all the resources unmodified and now under management of helm. Here is an example script to modify the existing resources: diff --git a/charts/aws-vpc-cni/templates/customresourcedefinition.yaml b/charts/aws-vpc-cni/crds/customresourcedefinition.yaml similarity index 84% rename from charts/aws-vpc-cni/templates/customresourcedefinition.yaml rename to charts/aws-vpc-cni/crds/customresourcedefinition.yaml index bda35b9edc..465642818b 100644 --- a/charts/aws-vpc-cni/templates/customresourcedefinition.yaml +++ b/charts/aws-vpc-cni/crds/customresourcedefinition.yaml @@ -1,10 +1,9 @@ -{{- if .Values.crd.create -}} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: eniconfigs.crd.k8s.amazonaws.com labels: -{{ include "aws-vpc-cni.labels" . | indent 4 }} + k8s-app: aws-node spec: scope: Cluster group: crd.k8s.amazonaws.com @@ -21,4 +20,3 @@ spec: plural: eniconfigs singular: eniconfig kind: ENIConfig -{{- end -}}