Skip to content
Snippets Groups Projects
Commit d20e4438 authored by Mikhail Piatliou (EPAM)'s avatar Mikhail Piatliou (EPAM) Committed by Siarhei Symanovich (EPAM)
Browse files

Merge branch 'fix_bootstrap_and_configmap' into 'master'

Fix bootstrap and configmap

See merge request !340

(cherry picked from commit 2662f843)

332312b5 Fix configmap
bc70477a Fix bootstrap
b531340a Remove BEARER_TOKEN var
parent cbd187b9
No related branches found
No related tags found
1 merge request!355Cherry pick fix_bootstrap_and_configmap into release 0.18
Pipeline #163283 failed
......@@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: {{ printf "%s-bootstrap" .Values.conf.appName | quote }}
app: {{ .Values.conf.appName | quote }}
name: {{ .Values.conf.configmap | quote }}
namespace: {{ .Release.Namespace | quote }}
data:
......
......@@ -19,12 +19,12 @@ get_token_onprem() {
--data-urlencode "scope=openid" \
--data-urlencode "client_id=${OPENID_PROVIDER_CLIENT_ID}" \
--data-urlencode "client_secret=${OPENID_PROVIDER_CLIENT_SECRET}" | jq -r ".id_token")"
export BEARER_TOKEN="Bearer ${ID_TOKEN}"
export ID_TOKEN
}
get_token_gcp() {
BEARER_TOKEN=$(gcloud auth print-identity-token --audiences="${GOOGLE_AUDIENCES}")
export BEARER_TOKEN
ID_TOKEN=$(gcloud auth print-identity-token --audiences="${GOOGLE_AUDIENCES}")
export ID_TOKEN
}
check_entitlements_readiness() {
......@@ -33,7 +33,7 @@ check_entitlements_readiness() {
--write-out "%{http_code}" --silent --output "/dev/null" \
--header 'Content-Type: application/json' \
--header "data-partition-id: ${DATA_PARTITION_ID}" \
--header "Authorization: ${BEARER_TOKEN}")
--header "Authorization: Bearer ${ID_TOKEN}")
if [ "$status_code" == 200 ]; then
echo "$status_code: Entitlements provisioning completed successfully!"
......@@ -55,7 +55,7 @@ create_legaltag() {
"countryOfOrigin":["US"],
"contractId":"No Contract Related",
"expirationDate":"2099-01-01",
"dataType":"Public Domain Data",
"dataType":"Public Domain Data",
"originator":"OSDU",
"securityClassification":"Public",
"exportClassification":"EAR99",
......@@ -69,7 +69,7 @@ EOF
--url "${LEGAL_HOST}/api/legal/v1/legaltags" \
--write-out "%{http_code}" --silent --output "output.txt" \
--header "Content-Type: application/json" \
--header "authorization: Bearer ${BEARER_TOKEN}" \
--header "Authorization: Bearer ${ID_TOKEN}" \
--header "data-partition-id: ${DATA_PARTITION_ID}" \
--data @/opt/default_legal_tag.json)
......
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