diff --git a/devops/gc/deploy/README.md b/devops/gc/deploy/README.md index b02204e6656572f2446259428dacc5a1885bd042..4f5a720fbc78cb52460d603267e1bd799fcf0a18 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 | @@ -52,8 +59,6 @@ First you need to set variables in **values.yaml** file using any code editor. S **conf.appName** | name of the app | string | `unit` | yes **conf.configmap** | configmap to be used | string | `unit-config` | yes -**conf.onPremEnabled** | whether on-prem is enabled | boolean | false | yes -**conf.domain** | your domain | string | - | yes ### Istio variables diff --git a/devops/gc/deploy/templates/unit-service.yml b/devops/gc/deploy/templates/unit-service.yml index 3a775522603307d0424f138818bb66aae487620e..567a2e3676a143daf2e2e6f10760d7afc5378d54 100644 --- a/devops/gc/deploy/templates/unit-service.yml +++ b/devops/gc/deploy/templates/unit-service.yml @@ -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/unit-serviceaccount.yaml b/devops/gc/deploy/templates/unit-serviceaccount.yaml index f0771985cd5da9db77781dc3ab635e52378b3fb6..eec72f12889eec74d3de43ae6527a860bcd876ea 100644 --- a/devops/gc/deploy/templates/unit-serviceaccount.yaml +++ b/devops/gc/deploy/templates/unit-serviceaccount.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/unit-virtual-service.yml b/devops/gc/deploy/templates/unit-virtual-service.yml index 7315edfd2314bc408053b46f4fc09e53429a4cb5..d5abe8e83b368197afc94ae49dfa8e097cb5e4db 100644 --- a/devops/gc/deploy/templates/unit-virtual-service.yml +++ b/devops/gc/deploy/templates/unit-virtual-service.yml @@ -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 68b11eb627bb72c21ac7c494b3275e92143b0601..12f3dd2e7ace61cd1582700378730a7017ff3792 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: logLevel: "ERROR" entitlementsHost: "http://entitlements" @@ -16,8 +20,6 @@ data: conf: appName: "unit" configmap: "unit-config" - onPremEnabled: false - domain: "" istio: proxyCPU: "10m"