sip/tools/deployment/deploy-sip.sh
sa069q ab0d3f097c Dex deployment related changes for SIP
- This patchset installs ClusterIssuer that references the selfsigned certificates generated via Issuer in config/samples
 - Passing in the generated secret from Issuer in SIP CR so that it can be consumed by ClusterIssuer
 - Changes made in overall structure of config/samples since Issuer and Secret required for dex needs to be in cert-manager namespace
 - Changes made in install-k8s.sh since minikube installation needs that apiserver-names param for dex endpoint to work
 - Changes made in deploy-sip.sh for installation of Cert-Manager since we need to enable it temporarily for gates
 - Added TODO for Auth related Test cases, for more details https://github.com/airshipit/sip/issues/14

Note: This patchset doesn't install Dex but the pre-req for Dex

Change-Id: If1962ead2a38dd0082a5e8978e5869f5c06aa757
2021-04-26 07:23:56 +00:00

26 lines
1020 B
Bash
Executable File

#!/bin/bash
set -xe
sudo snap install kustomize && sudo snap install go --classic
make images
kubectl wait --for=condition=Ready pods --all -A --timeout=180s
make deploy
#Wait for sip controller manager Pod
count=0
until [[ $(kubectl -n sipcluster-system get pod -l control-plane=controller-manager 2>/dev/null) ]]; do
count=$((count + 1))
if [[ ${count} -eq "120" ]]; then
echo ' Timed out waiting for sip controller manager pod to exist' >&3
return 1
fi
sleep 2
done
kubectl wait -n sipcluster-system pod -l control-plane=controller-manager --for=condition=ready --timeout=240s
kubectl get po -A
# Install Cert-Manager
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.1.1/cert-manager.yaml
kubectl wait --timeout=180s --for=condition=Established crd/clusterissuers.cert-manager.io \
crd/issuers.cert-manager.io \
crd/certificaterequests.cert-manager.io \
crd/certificates.cert-manager.io
kubectl rollout status --timeout=180s -n cert-manager deployment/cert-manager