-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from keerthibingi/v4.1.7
Releasing 4.1.10 chart with 4.1.7 app version with token automation changes
- Loading branch information
Showing
8 changed files
with
135 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
charts/isdargo/templates/keycloak/controller-token-creation.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{{- if (eq .Values.installationMode "OEA-AP") }} | ||
{{- if not .Values.installArgoCD }} | ||
{{- if not .Values.installArgoRollouts }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
annotations: | ||
"helm.sh/hook": "post-install" | ||
"helm.sh/hook-delete-policy": "before-hook-creation" | ||
name: isd-configure | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- args: | ||
- |- | ||
echo "Waiting for ISD Services to come-up" | ||
wait_period=0 | ||
while true | ||
do | ||
kubectl get po -n {{ .Release.Namespace }} -o jsonpath='{range .items[*]}{..metadata.name}{"\t"}{..containerStatuses..ready}{"\n"}{end}' > /tmp/live.status | ||
OESSAPOR=$(grep oes-sapor /tmp/live.status | awk '{print $2}') | ||
OESGATE=$(grep oes-gate /tmp/live.status | awk '{print $2}') | ||
OESUI=$(grep oes-ui /tmp/live.status | awk '{print $2}') | ||
OESPLATFORM=$(grep oes-platform /tmp/live.status | awk '{print $2}') | ||
CONTROLLER=$(grep opsmx-controller /tmp/live.status | awk '{print $2}') | ||
if [ "$OESPLATFORM" == "true" ] && [ "$OESUI" == "true" ] && [ "$OESGATE" == "true" ] && [ "$CONTROLLER" == "true" ] && [ "$OESSAPOR" == "true" ]; | ||
then | ||
## Controller Token Creation and Updation | ||
controllerhost=$(kubectl get pods | grep opsmx-controller | awk '{print $1}') | ||
kubectl -n {{ .Release.Namespace }} exec $controllerhost -- sh -c "./agent-controller -generate-control-tokens controller" > /tmp/controller.txt | ||
controllertoken=$(cat /tmp/controller.txt) | ||
kubectl -n {{ .Release.Namespace }} get secret oes-carina-config -o jsonpath='{.data.*}' | base64 -d > /tmp/carina-manager.yaml | ||
kubectl -n {{ .Release.Namespace }} get secret oes-sapor-config -o jsonpath='{.data.*}' | base64 -d > /tmp/application.yml | ||
yq e -i '.controller.token = "'$controllertoken'"' /tmp/carina-manager.yaml | ||
kubectl -n {{ .Release.Namespace }} delete secret oes-carina-config | ||
kubectl -n {{ .Release.Namespace }} create secret generic oes-carina-config --from-file=/tmp/carina-manager.yaml | ||
yq e -i '.controller.token = "'$controllertoken'"' /tmp/application.yml | ||
kubectl -n {{ .Release.Namespace }} delete secret oes-sapor-config | ||
kubectl -n {{ .Release.Namespace }} create secret generic oes-sapor-config --from-file=/tmp/application.yml | ||
kubectl -n {{ .Release.Namespace }} rollout restart deploy/oes-carina deploy/oes-sapor | ||
sleep 1m | ||
break | ||
else | ||
if [ $wait_period -gt 2000 ]; | ||
then | ||
echo "Script is timed out as ISD Pods are not up......." | ||
break | ||
else | ||
echo "Waiting for ISD Pods to be ready" | ||
sleep 30 | ||
fi | ||
fi | ||
done | ||
command: | ||
- /bin/bash | ||
- +x | ||
- -c | ||
image: quay.io/opsmxpublic/opsmx-custom-binaries:kubectl-spin-cli-git-bash-jq-yq-argocd-v2 | ||
imagePullPolicy: Always | ||
name: isd-configure | ||
serviceAccountName: isd-auto-configure-{{ .Release.Namespace }} | ||
restartPolicy: Never | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters