Skip to content
Snippets Groups Projects
Commit 2c091ad3 authored by Oleksandr Kosse (EPAM)'s avatar Oleksandr Kosse (EPAM)
Browse files

Merge branch 'GONRG-5965_Refactor_PROJECT_ID_variable_for_anthos' into 'master'

GONRG-5965: Refactor PROJECT_ID variable for anthos/reference implementation

See merge request !300
parents cba4fd45 b166232a
No related branches found
No related tags found
1 merge request!300GONRG-5965: Refactor PROJECT_ID variable for anthos/reference implementation
Pipeline #149909 failed
......@@ -98,7 +98,7 @@ First you need to set variables in **values.yaml** file using any code editor. S
|------|-------------|------|---------|---------|
**logLevel** | logging level | string | INFO | yes
**springProfilesActive** | active spring profile | string | gcp | yes
**projectId** | your Google Cloud project id | string | - | yes
**projectId** | your Google Cloud project id | string | - | only in case of Google Cloud installation
**dataProjectId** | in case of multiproject cloud installation (services and data stored in different project) the name of data project | string | - | only in case of multiproject installation
**partitionAdminAccounts** | admin accounts validated by partition service | string | - | yes
**serviceAccountTail** | ending of Google Cloud service account | string | .iam.gserviceaccount.com | yes
......@@ -106,6 +106,7 @@ First you need to set variables in **values.yaml** file using any code editor. S
**partitionNamespace** | datastore namespace where partition will store the data | string | partition | yes
**dataPartitionId** | data partition id | string | - | yes
**datafierSa** | datafier service account | string | datafier | yes
**bucketPrefix** | minio bucket name prefix | string | - | only in case of Reference installation
**minioExternalEndpoint** | api url for external minio, if external minio is configured - this value will be set for MINIO_ENDPOINT and FILE_MINIO_ENDPOINT in bootstrap configmap | string | - | no
### Deployment variables
......
......@@ -10,17 +10,18 @@ data:
DATA_PARTITION_ID: "{{ .Values.data.dataPartitionId }}"
PARTITION_CLEAN_UP_ENABLED: "{{ .Values.data.partitionCleanUpEnabled }}"
ENVIRONMENT: "{{ .Values.data.springProfilesActive }}"
{{- if .Values.data.dataProjectId }}
PROJECT_ID: "{{ .Values.data.dataProjectId }}"
{{- else }}
PROJECT_ID: "{{ .Values.data.projectId }}"
{{- end }}
{{- if .Values.conf.onPremEnabled }}
SERVICE_ACCOUNT: {{ printf "%s@service.local" .Values.data.datafierSa | quote }}
DOMAIN: "{{ .Values.conf.domain }}"
BUCKET_PREFIX: {{ .Values.data.bucketPrefix | quote }}
MINIO_ENDPOINT: {{ default "http://minio:9000" .Values.data.minioExternalEndpoint | quote }}
FILE_MINIO_ENDPOINT: {{ default (printf "https://s3.%s" .Values.conf.domain) .Values.data.minioExternalEndpoint | quote }}
{{- else }}
{{- if .Values.data.dataProjectId }}
PROJECT_ID: "{{ .Values.data.dataProjectId }}"
{{- else }}
PROJECT_ID: "{{ .Values.data.projectId }}"
{{- end }}
SERVICE_ACCOUNT: {{ printf "%s@%s.iam.gserviceaccount.com" .Values.data.datafierSa .Values.data.projectId | quote }}
{{- end }}
DATA_PARTITION_ID_LIST: {{ join "," .Values.data.dataPartitionIdList | quote }}
......@@ -10,6 +10,7 @@ data:
partitionName: "partition"
partitionNamespace: "partition"
datafierSa: "datafier"
bucketPrefix: ""
partitionCleanUpEnabled: "false"
minioExternalEndpoint: "" # use only if external minio is configured
# deployments
......
......@@ -127,7 +127,7 @@ osdu-gcp-anthos-deploy: # verified deploy after tests
--set data.bootstrapServiceAccountName=$OSDU_GCP_BOOTSTRAP_SA
--set data.image=$CI_REGISTRY_IMAGE/osdu-gcp-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.serviceAccountName=$OSDU_GCP_SERVICE
--set data.projectId=osdu-anthos
--set data.bucketPrefix=osdu-anthos
--set data.dataPartitionId=$OSDU_GCP_TENANT
--set data.logLevel=INFO
--set data.springProfilesActive=anthos
......
......@@ -6,7 +6,7 @@ generate_post_data_anthos() {
"properties": {
"projectId": {
"sensitive": false,
"value": "${PROJECT_ID}"
"value": "${BUCKET_PREFIX}"
},
"serviceAccount": {
"sensitive": false,
......@@ -30,7 +30,7 @@ generate_post_data_anthos() {
},
"bucket": {
"sensitive": false,
"value": "${PROJECT_ID}-${DATA_PARTITION_ID}-records"
"value": "${BUCKET_PREFIX}-${DATA_PARTITION_ID}-records"
},
"crmAccountID": {
"sensitive": false,
......
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