diff --git a/devops/gc/deploy/README.md b/devops/gc/deploy/README.md index fc55305b482b3bf55bb86c9ebb761bd50662b0fb..5e3eaafeac5c3cfadd27e0da83f2d27a036e7020 100644 --- a/devops/gc/deploy/README.md +++ b/devops/gc/deploy/README.md @@ -45,7 +45,7 @@ This example describes installation in **Development mode**: `kubectl get namespace <namespace> -o jsonpath={.metadata.labels}` The output shows that there are no any labels related to Istio: - + ```console {"kubernetes.io/metadata.name":"default"} ``` @@ -92,6 +92,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 | @@ -128,10 +135,8 @@ First you need to set variables in **values.yaml** file using any code editor. S **conf.postgresSecretName** | Secret name for postgres service | string | legal-postgres-secret | yes **conf.rabbitmqSecretName** | Secret name for rabbitmq service | string | rabbitmq-secret | yes **conf.bootstrapSecretName** | Secret name for bootstrap | string | datafier-secret | yes -**conf.onPremEnabled** | whether on-prem is enabled | boolean | false | yes **conf.istionEnabled** | whether enable istio resources | boolean | true | yes **conf.bootstrapEnabled** | whether bootstrap is enabled | boolean | false | yes -**conf.domain** | your domain | string | - | yes ### Istio variables diff --git a/devops/gc/deploy/templates/bootstrap-deployment.yaml b/devops/gc/deploy/templates/bootstrap-deployment.yaml index 3d2743fcd6c3a8ea8c2b65f09bbb892f7c493e53..3bb7b20360d92a42239cdff2217b2b2175bc89a2 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-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/configmap-bootstrap.yaml b/devops/gc/deploy/templates/configmap-bootstrap.yaml index da2680a45ae9b21f48afea358eb651e0297e83d2..dba79ebef66a494c2f2bc55018d4dbe0ee344961 100644 --- a/devops/gc/deploy/templates/configmap-bootstrap.yaml +++ b/devops/gc/deploy/templates/configmap-bootstrap.yaml @@ -11,5 +11,5 @@ data: ENTITLEMENTS_HOST: {{ .Values.data.entitlementsHost | quote }} LEGAL_HOST: {{ .Values.data.legalHost | quote }} DEFAULT_LEGAL_TAG: {{ .Values.data.defaultLegalTag | quote }} - ONPREM_ENABLED: {{ .Values.conf.onPremEnabled | quote }} + ONPREM_ENABLED: {{ .Values.global.onPremEnabled | quote }} {{- end }} diff --git a/devops/gc/deploy/templates/legal-deploy.yaml b/devops/gc/deploy/templates/legal-deploy.yaml index 4bb4ef6c081e468d63c35cbb570f023a77efbf9d..bf00c3812810df1368110da8d6beac67900932be 100644 --- a/devops/gc/deploy/templates/legal-deploy.yaml +++ b/devops/gc/deploy/templates/legal-deploy.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/legal-service-account.yaml b/devops/gc/deploy/templates/legal-service-account.yaml index f0771985cd5da9db77781dc3ab635e52378b3fb6..eec72f12889eec74d3de43ae6527a860bcd876ea 100644 --- a/devops/gc/deploy/templates/legal-service-account.yaml +++ b/devops/gc/deploy/templates/legal-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/legal-service.yaml b/devops/gc/deploy/templates/legal-service.yaml index 7647df54978f73c064a80066952c301c64af5960..acc44bcadbba89c97edee0d5ea455c4960aba429 100644 --- a/devops/gc/deploy/templates/legal-service.yaml +++ b/devops/gc/deploy/templates/legal-service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ .Values.conf.appName | quote }} - {{- 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/legal-virtual-service.yaml b/devops/gc/deploy/templates/legal-virtual-service.yaml index 9933ef57703e07986c3b97f5e47ec024f66723b9..a515e99af831a1e3c1711aedbed3704d8f7452b9 100644 --- a/devops/gc/deploy/templates/legal-virtual-service.yaml +++ b/devops/gc/deploy/templates/legal-virtual-service.yaml @@ -6,10 +6,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 9025e4c366ca380d1652b201bbec3f0ceb7ef1e1..ffb1f2dc706102490f04851a6de24acc2d257c50 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" @@ -29,10 +33,8 @@ conf: postgresSecretName: "legal-postgres-secret" rabbitmqSecretName: "rabbitmq-secret" bootstrapSecretName: "datafier-secret" - onPremEnabled: false istioEnabled: true bootstrapEnabled: false - domain: "" istio: proxyCPU: "10m"