diff --git a/devops/gcp/configmap/templates/partition-bootstrap-configmap.yml b/devops/gcp/configmap/templates/partition-bootstrap-configmap.yml index 09f454d5c7fe4ae7bc7f7abd6eda22ac69460af0..1bbe1ba058434f39e28d48641794c44770fd7738 100644 --- a/devops/gcp/configmap/templates/partition-bootstrap-configmap.yml +++ b/devops/gcp/configmap/templates/partition-bootstrap-configmap.yml @@ -9,11 +9,10 @@ data: PARTITION_NAME: "{{ .Values.data.partitionName }}.{{ .Release.Namespace }}.svc.cluster.local" PROJECT_ID: "{{ .Values.data.projectId }}" DATA_PARTITION_ID: "{{ .Values.data.dataPartitionId }}" + DATAFIER_SA: "{{ .Values.data.datafierSa }}" + ENVIRONMENT: "{{ .Values.data.springProfilesActive }}" {{- if .Values.conf.onPremEnabled }} DOMAIN: "{{ .Values.data.domain }}" - ENVIRONMENT: "{{ .Values.data.environment }}" - CLIENT_ID: "{{ .Values.data.clientId }}" {{- else }} AUDIENCES: "{{ .Values.data.googleAudiences }}" - DATAFIER_SA: "{{ .Values.data.datafierSa }}" {{- end }} diff --git a/devops/gcp/configmap/templates/partition-variables.yml b/devops/gcp/configmap/templates/partition-variables.yml index ded1afe48f0c4564a811619759c4d4cfdebdf77d..77ad50dc6788bdd905f2d09b32115a6a32d22d75 100644 --- a/devops/gcp/configmap/templates/partition-variables.yml +++ b/devops/gcp/configmap/templates/partition-variables.yml @@ -8,9 +8,7 @@ metadata: data: LOG_LEVEL: "{{ .Values.data.logLevel }}" SPRING_PROFILES_ACTIVE: "{{ .Values.data.springProfilesActive }}" - {{- if .Values.conf.onPremEnabled }} - PARTITION_NAMESPACE: "{{ .Values.data.partitionNamespace }}" - {{- else }} + {{- if not .Values.conf.onPremEnabled }} GOOGLE_CLOUD_PROJECT: "{{ .Values.data.projectId }}" PARTITION_ADMIN_ACCOUNTS: "{{ .Values.data.partitionAdminAccounts }}" GOOGLE_AUDIENCES: "{{ .Values.data.googleAudiences }}" diff --git a/devops/gcp/configmap/values.yaml b/devops/gcp/configmap/values.yaml index 260e4a237cf94621b385a36f11b13eef7872a053..f7661110a12f37037370bb7528ba62b763aa3334 100644 --- a/devops/gcp/configmap/values.yaml +++ b/devops/gcp/configmap/values.yaml @@ -1,20 +1,18 @@ data: + # common + logLevel: "INFO" + springProfilesActive: "gcp" + # gcp projectId: "" partitionAdminAccounts: "" googleAudiences: "" - logLevel: "INFO" serviceAccountTail: ".iam.gserviceaccount.com" - # FIXME GONRG-4910 - partitionNamespace: "" - springProfilesActive: "gcp" # bootstrap common partitionName: "partition" dataPartitionId: "" datafierSa: "datafier" # bootstrap variables onprem domain: "" - environment: "" - clientId: "datafier" conf: configmap: "partition-config" appName: "partition" diff --git a/provider/partition-gcp/bootstrap/bootstrap_partition.sh b/provider/partition-gcp/bootstrap/bootstrap_partition.sh index a448cb168964dd00beb6d50a1492363b072a3748..c96da32938c6647e97406e22b1962a5781245c1e 100644 --- a/provider/partition-gcp/bootstrap/bootstrap_partition.sh +++ b/provider/partition-gcp/bootstrap/bootstrap_partition.sh @@ -136,7 +136,7 @@ EOF if [ "$ENVIRONMENT" == "anthos" ] then - SERVICEACCOUNT=$CLIENT_ID@service.local + SERVICEACCOUNT=$DATAFIER_SA@service.local status_code=$(curl -X POST \ --url "http://${PARTITION_NAME}/api/partition/v1/partitions/${DATA_PARTITION_ID}" --write-out "%{http_code}" --silent --output "/dev/null" \ @@ -157,8 +157,7 @@ then exit 1 fi -# FIXME "$ENVIRONMENT" == "gcp" or use another variable -elif [ "$ENVIRONMENT" == "" ] +elif [ "$ENVIRONMENT" == "gcp" ] then echo "sleep to prevent 500 response from the Partition service, due to timeout of creation for Workload Identity"