Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/init scripts #44

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Chrislevi
Copy link
Contributor

Few minor fixes to the init scripts.

  • vault-init.sh:15 - suggested default change, breaks with previous deploys although it is not necessary towards the label refactor

  • vault-unseal.sh:26 - $RELEASE is not the container's name inside the pod. changed it to an exsiting var $COMPONENT.

@@ -11,16 +12,16 @@ RELEASE=$1
NAMESPACE=$2
CHART_NAME="vault"
COMPONENT="${RELEASE}-vault"
ADD_SECRET=${3-"false"}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested default change, breaks with previous deploys although it is not necessary towards the label refactor


SECRET_NAME="$RELEASE-vault-keys"

LABELS=$(kubectl get secret -l release=$RELEASE -n $NAMESPACE --show-labels | sed -n 2p | awk '{print $5}' | sed 's/\,/ /g')
FIRST_VAULT_POD=$(kubectl get po -l component=$COMPONENT,release=$RELEASE -n $NAMESPACE | awk '{if(NR==2)print $1}')
INIT_MESSAGE=$(kubectl exec -n $NAMESPACE -c $RELEASE $FIRST_VAULT_POD -- sh -c "vault operator init --tls-skip-verify" 2>&1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$RELEASE is not the container's name inside the pod. changed it to an exsiting var $COMPONENT which holds the correct name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant