Created
December 18, 2022 08:26
-
-
Save itsmunim/152e4f29bc8d70d046a0d4dc348e2e2f to your computer and use it in GitHub Desktop.
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: init-container-script | |
data: | |
init.sh: |- | |
#!/bin/sh | |
echo "Setting up the dependencies..." | |
# Setup secrethub cli | |
apk add --repository https://alpine.secrethub.io/alpine/edge/main --allow-untrusted secrethub-cli | |
# Pick up secrethub service account credential, already mounted by k8s | |
export SECRETHUB_CREDENTIAL=$(cat /bin/.secrethub-credential) | |
echo "Injecting secrets into env file..." | |
# Interpolate the non-interpolated secret values and then put the final file in expected place | |
secrethub inject -i /bin/secrets.env -o /data/secrets.env -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment