Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airgapped BOM script to Halyard init configmap #177

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,25 @@ data:
kubectl apply -f /tmp/spinnaker/pipeline-decrypted/ -n ${SPINNAKER_NAMESPACE}
fi
fi

# Added by Saga, for Air-gapped install
{{- if not .Values.gcs.enabled }}
printf 'spinnaker.config.input.gcs.enabled: false\n' >> /tmp/config/halyard-local.yml

# Copy of copyBoms.sh from callCopyBoms.sh from old Airgapped procedure
#Purpose: Copies BOM files to /home/spinnaker/.hal/.boms
echo "This Host is :"
hostname; hostname -i
cd /tmp
CMBOM=$(kubectl get configmap | grep custombom | awk '{print $1}')
kubectl get configmap $CMBOM -o "jsonpath={.data['boms\.enc']}" > halyard-custombom.enc
cat halyard-custombom.enc | base64 -d | base64 -d > spin-boms.tar.gz
du spin-boms.tar.gz halyard-custombom.enc
tar -xzvf spin-boms.tar.gz
# [ ! -d /home/spinnaker/.hal ] && mkdir -pv /home/spinnaker/.hal
# cp -rv .boms /home/spinnaker/.hal/
[ ! -d /tmp/spinnaker/.hal ] && mkdir -pv /tmp/spinnaker/.hal
cp -rv .boms /tmp/spinnaker/.hal/

echo "DONE - Deploying BOM"
{{- end }}