Skip to content

Commit

Permalink
simple "is sealed secrets installed" check; both secrets gens do this…
Browse files Browse the repository at this point in the history
… validation
  • Loading branch information
Cory Ringdahl authored and cardoe committed Jun 18, 2024
1 parent 5be17f0 commit ccdfad6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/easy-secrets-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ if ! type -p kubeseal kubectl > /dev/null; then
exit 1
fi

if ! $(kubectl api-resources | grep -q sealedsecrets); then
echo "Your cluster doesn't appear to have the sealed secrets operator installed." >&2
exit 1
fi

function secret-seal-stdin() {
# this is meant to be piped to
# $1 is output file, -w
Expand Down
10 changes: 10 additions & 0 deletions scripts/gitops-secrets-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ function usage() {
exit 1
}

if ! type -p kubeseal kubectl > /dev/null; then
echo "You must have kubeseal & kubectl installed to use this script" >&2
exit 1
fi

if ! $(kubectl api-resources | grep -q sealedsecrets); then
echo "Your cluster doesn't appear to have the sealed secrets operator installed." >&2
exit 1
fi

function secret-seal-stdin() {
# this is meant to be piped to
# $1 is output file, -w
Expand Down

0 comments on commit ccdfad6

Please sign in to comment.