diff --git a/devops/gc/deploy/README.md b/devops/gc/deploy/README.md index 6019fde5209af742c5c124cfb5ec15ab31332ad4..1f9fa7731011ee99f5ecd2a22e8fcf908c932fc1 100644 --- a/devops/gc/deploy/README.md +++ b/devops/gc/deploy/README.md @@ -26,6 +26,13 @@ Packages are only needed for installation from a local computer. First you need to set variables in **values.yaml** file using any code editor. Some of the values are prefilled, but you need to specify some values as well. You can find more information about them below. +### Global variables + +| Name | Description | Type | Default |Required | +|------|-------------|------|---------|---------| +**global.domain** | your domain for the external endpoint, ex `example.com` | string | - | yes +**global.onPremEnabled** | whether on-prem is enabled | boolean | false | yes + ### Configmap variables | Name | Description | Type | Default |Required | @@ -59,9 +66,7 @@ First you need to set variables in **values.yaml** file using any code editor. S **conf.appName** | name of the app | string | `schema` | yes **conf.bootstrapSecretName** | secret for bootstrap | string | `datafier-secret` | yes **conf.configmap** | configmap to be used | string | `schema-config` | yes -**conf.domain** | your domain | string | - | yes **conf.minioSecretName** | secret for minio | string | `schema-minio-secret` | yes -**conf.onPremEnabled** | whether on-prem is enabled | boolean | false | yes **conf.postgresSecretName** | secret for postgres | string | `schema-postgres-secret` | yes **conf.rabbitmqSecretName** | secret for rabbitmq | string | `rabbitmq-secret` | yes diff --git a/devops/gc/deploy/templates/configmap-bootstrap.yaml b/devops/gc/deploy/templates/configmap-bootstrap.yaml index f63e8afb2bd0d9ff5f2f81ea66f8f8b2224326cd..590edc97a9201249e977fdb2e3283f6e3d69b2f0 100644 --- a/devops/gc/deploy/templates/configmap-bootstrap.yaml +++ b/devops/gc/deploy/templates/configmap-bootstrap.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ .Release.Namespace | quote }} data: DATA_PARTITION: {{ .Values.data.dataPartitionId | quote }} - ONPREM_ENABLED: {{ .Values.conf.onPremEnabled | quote }} + ONPREM_ENABLED: {{ .Values.global.onPremEnabled | quote }} ENABLE_CLEANUP: {{ .Values.data.enableCleanup | quote }} SCHEMA_URL: {{ .Values.data.schemaHost | quote }} ENTITLEMENTS_HOST: {{ .Values.data.entitlementsHost | quote }} diff --git a/devops/gc/deploy/templates/deployment-bootstrap.yaml b/devops/gc/deploy/templates/deployment-bootstrap.yaml index 24b81adfc89179c2c0245ded67f0650ace942f50..31b156f2669b5c047c6cdc02a07802332557b52d 100644 --- a/devops/gc/deploy/templates/deployment-bootstrap.yaml +++ b/devops/gc/deploy/templates/deployment-bootstrap.yaml @@ -33,7 +33,7 @@ spec: envFrom: - configMapRef: name: {{ printf "%s-bootstrap" .Values.conf.configmap | quote }} - {{- if .Values.conf.onPremEnabled }} + {{- if .Values.global.onPremEnabled }} - secretRef: name: {{ .Values.conf.bootstrapSecretName | quote }} {{- end }} diff --git a/devops/gc/deploy/templates/deployment.yaml b/devops/gc/deploy/templates/deployment.yaml index e295df0b3a250657517615b31ea4375e8cfb686b..852f4d9f0a82ead63e0942aa3786e3291adbb221 100644 --- a/devops/gc/deploy/templates/deployment.yaml +++ b/devops/gc/deploy/templates/deployment.yaml @@ -28,7 +28,7 @@ spec: envFrom: - configMapRef: name: {{ .Values.conf.configmap | quote }} - {{- if .Values.conf.onPremEnabled }} + {{- if .Values.global.onPremEnabled }} - secretRef: name: {{ .Values.conf.minioSecretName | quote }} - secretRef: diff --git a/devops/gc/deploy/templates/service-account.yaml b/devops/gc/deploy/templates/service-account.yaml index f0771985cd5da9db77781dc3ab635e52378b3fb6..eec72f12889eec74d3de43ae6527a860bcd876ea 100644 --- a/devops/gc/deploy/templates/service-account.yaml +++ b/devops/gc/deploy/templates/service-account.yaml @@ -1,4 +1,4 @@ -{{- if .Values.conf.onPremEnabled }} +{{- if .Values.global.onPremEnabled }} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/devops/gc/deploy/templates/service.yaml b/devops/gc/deploy/templates/service.yaml index df5b6ba374b68b181a04f19d33087ee337912f7b..5f49c52960b58388afc4015f7d4995d4acdca807 100644 --- a/devops/gc/deploy/templates/service.yaml +++ b/devops/gc/deploy/templates/service.yaml @@ -3,7 +3,7 @@ kind: Service metadata: name: {{ .Values.conf.appName | quote }} annotations: - {{- if not .Values.conf.onPremEnabled }} + {{- if not .Values.global.onPremEnabled }} cloud.google.com/neg: '{"ingress": true}' {{- end }} namespace: {{ .Release.Namespace | quote }} diff --git a/devops/gc/deploy/templates/virtual-service.yaml b/devops/gc/deploy/templates/virtual-service.yaml index 4caac66bd0ae70f1932037d11bbd65beed34e388..bd529c21d6b1ed8ed0b6302d5fc62d364e14d76d 100644 --- a/devops/gc/deploy/templates/virtual-service.yaml +++ b/devops/gc/deploy/templates/virtual-service.yaml @@ -5,10 +5,10 @@ metadata: namespace: {{ .Release.Namespace | quote }} spec: hosts: - {{- if and .Values.conf.domain .Values.conf.onPremEnabled }} - - {{ printf "osdu.%s" .Values.conf.domain | quote }} - {{- else if .Values.conf.domain }} - - {{ .Values.conf.domain | quote }} + {{- if and .Values.global.domain .Values.global.onPremEnabled }} + - {{ printf "osdu.%s" .Values.global.domain | quote }} + {{- else if .Values.global.domain }} + - {{ .Values.global.domain | quote }} {{- else }} - "*" {{- end }} diff --git a/devops/gc/deploy/values.yaml b/devops/gc/deploy/values.yaml index 2d13f7f5058250f35c5b644e0f9e98df0757e638..9c3d5fcef0fe10b0fd104b8e42ca01d1ef455a1f 100644 --- a/devops/gc/deploy/values.yaml +++ b/devops/gc/deploy/values.yaml @@ -1,3 +1,7 @@ +global: + domain: "" + onPremEnabled: false + data: #Configmaps dataPartitionId: "" @@ -28,9 +32,7 @@ conf: appName: "schema" bootstrapSecretName: "datafier-secret" configmap: "schema-config" - domain: "" minioSecretName: "schema-minio-secret" - onPremEnabled: false postgresSecretName: "schema-postgres-secret" rabbitmqSecretName: "rabbitmq-secret"