UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit a5359281 authored by Micah Nagel's avatar Micah Nagel
Browse files

Merge branch 'flux-airgap-update' into 'master'

Allow for easier flux airgap update

See merge request platform-one/big-bang/bigbang!848
parents 55f69cf8 72a09ac3
No related branches found
No related tags found
1 merge request!848Allow for easier flux airgap update
Pipeline #462551 failed
......@@ -21,6 +21,7 @@ function help {
cat << EOF
usage: $(basename "$0") <arguments>
-h|--help - print this help message and exit
-r|--registry-url - (optional, default: registry1.dso.mil) registry url to use for flux installation
-u|--registry-username - (required) registry username to use for flux installation
-p|--registry-password - (required) registry password to use for flux installation
-w|--wait-timeout - (optional, default: 120) how long to wait; in seconds, for each key flux resource component
......@@ -33,7 +34,7 @@ EOF
PARAMS=""
while (( "$#" )); do
case "$1" in
case "$1" in
# registry username required argument
-u|--registry-username)
if [ -n "$2" ] && [ "${2:0:1}" != "-" ]; then
......@@ -64,6 +65,16 @@ while (( "$#" )); do
help; exit 1
fi
;;
# registry url optional argument
-r|--registry-url)
if [ -n "$2" ] && [ "${2:0:1}" != "-" ]; then
REGISTRY_URL=$2
shift 2
else
echo "Error: Argument for $1 is missing" >&2
help; exit 1
fi
;;
# wait timeout optional argument
-w|--wait-timeout)
if [ -n "$2" ] && [ "${2:0:1}" != "-" ]; then
......@@ -117,7 +128,7 @@ kubectl create secret docker-registry "$FLUX_SECRET" -n flux-system \
--dry-run=client -o yaml | kubectl apply -n flux-system -f -
echo "Installing flux from kustomization"
kustomize build "$FLUX_KUSTOMIZATION" | kubectl apply -f -
kustomize build "$FLUX_KUSTOMIZATION" | sed "s/registry1.dso.mil/${REGISTRY_URL}/g" | kubectl apply -f -
#
# verify flux
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment