Skip to content

Commit

Permalink
translate env vars if found within file string
Browse files Browse the repository at this point in the history
  • Loading branch information
jmclean-starburst committed Nov 22, 2021
1 parent 282cf7e commit ee3ae63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/ARGOCD.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ARG KUBECTL_VERSION="1.22.0"
USER root
RUN apt-get update && \
apt-get install -y \
curl && \
curl gettext-base && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl -fSSL https://github.com/mozilla/sops/releases/download/v${SOPS_VERSION}/sops-v${SOPS_VERSION}.linux \
Expand Down Expand Up @@ -309,6 +309,8 @@ spec:
- secrets+gpg-import-kubernetes://argocd/helm-secrets-private-keys#key.asc?https://raw.githubusercontent.com/jkroepke/helm-secrets/main/tests/assets/values/sops/values.yaml
# Using https://github.com/aslafy-z/helm-git
- secrets+gpg-import-kubernetes://argocd/helm-secrets-private-keys#key.asc?git+https://github.com/jkroepke/helm-secrets@tests/assets/values/sops/secrets.yaml?ref=main"
# Fetching from a private repo with env variable
- secrets://https://$GITHUB_TOKEN@raw.githubusercontent.com/org/repo/ref/pathtofile.yml
```

## Known Issues
Expand Down
3 changes: 2 additions & 1 deletion scripts/commands/view.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ EOF
}

view_helper() {
file="$1"
file=$(echo "${1}" | envsubst) # translate env vars supplied
echo $file >&2

if ! _file_exists "$file"; then
error 'File does not exist: %s\n' "${file}"
Expand Down

0 comments on commit ee3ae63

Please sign in to comment.