diff --git a/devops/gc/deploy/README.md b/devops/gc/deploy/README.md index dba30bc19344fdf06a6980e79f2f1e831683dc9f..98ce0c39f088be5abac2163b7a75e1cd669a36dd 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 | @@ -73,9 +80,7 @@ First you need to set variables in **values.yaml** file using any code editor. S **conf.storageRedisSecretName** | secret for redis that contains redis password with REDIS_PASSWORD key | string | `storage-redis-secret` | yes **conf.bootstrapSecretName** | secret for bootstrap to access openid provider | string | `datafier-secret` | only if `conf.bootstrapEnabled` is true **conf.replicas** | Number of replicas | integer | 3 | yes -**conf.onPremEnabled** | whether on-prem is enabled | boolean | false | yes **conf.bootstrapEnabled** | whether storage bootstrap is enabled | boolean | false | yes -**conf.domain** | your domain, ex `example.com` | string | - | yes ### Istio variables diff --git a/devops/gc/deploy/templates/bootstrap-configmap.yaml b/devops/gc/deploy/templates/bootstrap-configmap.yaml index f4cf7f0a305c0634ec02e0b3ca7bcedf9c949933..337f5c3454891175603872d1d8e19f8a12d742e7 100644 --- a/devops/gc/deploy/templates/bootstrap-configmap.yaml +++ b/devops/gc/deploy/templates/bootstrap-configmap.yaml @@ -10,5 +10,5 @@ data: STORAGE_HOST: {{ .Values.data.storageHost | quote }} DEFAULT_LEGAL_TAG: {{ .Values.data.defaultLegalTag | quote }} DATA_PARTITION_ID: {{ .Values.data.dataPartitionId | quote }} - ONPREM_ENABLED: {{ .Values.conf.onPremEnabled | quote }} + ONPREM_ENABLED: {{ .Values.global.onPremEnabled | quote }} {{- end }} diff --git a/devops/gc/deploy/templates/bootstrap-deployment.yaml b/devops/gc/deploy/templates/bootstrap-deployment.yaml index 31999cee993ba1cf911e8c3d54edcfc940e5d461..509f93d3dfa0018d82ea12e57cce5a64c13d9d5f 100644 --- a/devops/gc/deploy/templates/bootstrap-deployment.yaml +++ b/devops/gc/deploy/templates/bootstrap-deployment.yaml @@ -34,7 +34,7 @@ spec: envFrom: - configMapRef: name: {{ printf "%s-config-bootstrap" .Values.conf.appName | 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 48e96b1cead930313402c7351d7c0723b73f6c89..2f746f6ca11638130679d64378a1d0f24876bafe 100644 --- a/devops/gc/deploy/templates/deployment.yaml +++ b/devops/gc/deploy/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: envFrom: - configMapRef: name: {{ printf "%s-config" .Values.conf.appName | quote }} - {{- if .Values.conf.onPremEnabled }} + {{- if .Values.global.onPremEnabled }} - secretRef: name: {{ .Values.conf.keycloakSecretName | 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 45bd505383e8204e40ebf5188814bc4a707b6c34..f985dd5f7a65eff8c6c0475c13d0298b9770ec00 100644 --- a/devops/gc/deploy/templates/service.yaml +++ b/devops/gc/deploy/templates/service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - {{- if not .Values.conf.onPremEnabled }} + {{- if not .Values.global.onPremEnabled }} annotations: cloud.google.com/neg: '{"ingress": true}' {{- end }} diff --git a/devops/gc/deploy/templates/virtual-service.yaml b/devops/gc/deploy/templates/virtual-service.yaml index 4bf9d0e65def75bd50ce0285bfeb35621363f06b..0e589c820a8a9392f5e3232f3015093a37c922c8 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 6b105c7d28c239944d011f95e9e02783da204954..2d78e36ed9466c01543d4f60cf305d2d07f18ed6 100644 --- a/devops/gc/deploy/values.yaml +++ b/devops/gc/deploy/values.yaml @@ -2,6 +2,10 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +global: + domain: "" + onPremEnabled: false + data: # configmaps logLevel: "ERROR" @@ -40,9 +44,7 @@ conf: rabbitmqSecretName: "rabbitmq-secret" bootstrapSecretName: "datafier-secret" replicas: 3 - onPremEnabled: false bootstrapEnabled: false - domain: "" storageRedisSecretName: "storage-redis-secret" istio: