Skip to content

Commit

Permalink
Merge pull request #95 from bcgov/chore/add-ches-secrets
Browse files Browse the repository at this point in the history
Chore/add ches secrets
  • Loading branch information
dleard authored Apr 18, 2024
2 parents 2b1087d + 4f24382 commit 4a0d0e7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ authorize:
.PHONY: provision
provision:
$(call oc_whoami)
# The gcs_terraform_buckets shells script is not idempotent (fails if buckets exist) & needs to be commented out for the helm_deploy script to run.
@@source .env; ./lib/gcs_terraform_buckets.sh -pp $$OC_PROJECT_PREFIXES -gcp $$GCP_PROJECT
@@source .env; ./lib/helm_deploy.sh -pp $$OC_PROJECT_PREFIXES -c ./helm/cas-provision/ -n cas-provision -v $$VALUES_FILE_PATH

Expand Down
28 changes: 28 additions & 0 deletions helm/cas-provision/templates/chesIntegration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- if hasPrefix .Values.namespacePrefixes.obps .Release.Namespace}}
kind: Secret
apiVersion: v1
metadata:
name: ches-integration
labels: {{ include "cas-provision.labels" . | nindent 4 }}
type: Opaque
stringData:
{{- if hasSuffix "-dev" .Release.Namespace }}
clientId: {{ .Values.ches.obps.dev.clientId }}
clientSecret: {{ .Values.ches.obps.dev.clientSecret }}
tokenEndpoint: {{ .Values.ches.obps.dev.tokenEndpoint }}
apiUrl: {{ .Values.ches.obps.dev.apiUrl }}
{{- end }}
{{- if hasSuffix "-test" .Release.Namespace }}
clientId: {{ .Values.ches.obps.test.clientId }}
clientSecret: {{ .Values.ches.obps.test.clientSecret }}
tokenEndpoint: {{ .Values.ches.obps.test.tokenEndpoint }}
apiUrl: {{ .Values.ches.obps.test.apiUrl }}
{{- end }}
{{- if hasSuffix "-prod" .Release.Namespace }}
clientId: {{ .Values.ches.obps.prod.clientId }}
clientSecret: {{ .Values.ches.obps.prod.clientSecret }}
tokenEndpoint: {{ .Values.ches.obps.prod.tokenEndpoint }}
apiUrl: {{ .Values.ches.obps.prod.apiUrl }}
{{- end }}

{{- end }}

0 comments on commit 4a0d0e7

Please sign in to comment.