Adopt most resources into a Helm install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NAME=test | |
NAMESPACE=default | |
RESOURCES=service,role.rolebinding # Comma-delimited | |
kubectl get -n $NAMESPACE $RESOURCES -o name \ | |
| xargs -I % kubectl label -n $NAMESPACE % app.kubernetes.io/managed-by=Helm | |
kubectl get -n $NAMESPACE $RESOURCES -o name \ | |
| xargs -I % kubectl annotate -n $NAMESPACE % meta.helm.sh/release-name=$NAME | |
kubectl get -n $NAMESPACE $RESOURCES -o name \ | |
| xargs -I % kubectl annotate -n $NAMESPACE % meta.helm.sh/release-namespace=$NAMESPACE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment