Skip to content

Commit

Permalink
Skip secret generation for production env
Browse files Browse the repository at this point in the history
Retales-To: #654
Change-Id: I984cfbc0e67ec32ae70ae3646bd59f5911494afb
  • Loading branch information
sirajyasin committed Dec 1, 2021
1 parent 6d79781 commit 4ed3a80
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions tools/airship-in-a-pod/examples/airshipctl/replacements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
path: "/spec/containers/6/env/10/value"
value: none

# The following relate to secret regeneration
# Set this to "true" in production environment to prevent secret generation
# and secret show
- op: replace
path: "/spec/containers/6/env/11/value"
value: "false"

# The following relate to authorization for pulling the airshipctl repository
# This is the type of authorization to use. Currently supported types are
# [none http-basic ssh-key]
Expand Down
2 changes: 2 additions & 0 deletions tools/airship-in-a-pod/examples/base/airship-in-a-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ spec:
value:
- name: AIRSHIP_CONFIG_MANIFEST_REPO_AUTH_TYPE
value: "none"
- name: SKIP_REGENERATE
value:

volumeMounts:
- name: cache
Expand Down
5 changes: 4 additions & 1 deletion tools/airship-in-a-pod/runner/assets/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ else
export NO_CHECKOUT="true"
fi
./tools/deployment/23_pull_documents.sh
./tools/deployment/23_generate_secrets.sh

if [[ "$SKIP_REGENERATE" = "false" ]]; then
./tools/deployment/23_generate_secrets.sh
fi

repo_url=$(yq -r .manifests.dummy_manifest.repositories.primary.url /root/.airship/config)
repo_name=$(basename ${repo_url})
Expand Down

0 comments on commit 4ed3a80

Please sign in to comment.