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

[GONRG-6649] Define global vars in registry

parent 4347453a
No related branches found
No related tags found
1 merge request!327[GONRG-6649] Define global vars in registry
Pipeline #173032 failed
......@@ -27,6 +27,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 |
......@@ -65,8 +72,6 @@ First you need to set variables in **values.yaml** file using any code editor. S
**conf.registerKeycloakSecretName** | secret for keycloak | string | register-keycloak-secret | yes
**conf.registerKmsSecretName** | secret for kms | string | "register-kms-secret" | yes
**conf.rabbitmqSecretName** | secret for rabbitmq | string | rabbitmq-secret | yes
**conf.onPremEnabled** | whether on-prem is enabled | boolean | false | yes
**conf.domain** | your domain | string | - | yes
### ISTIO variables
......
......@@ -28,7 +28,7 @@ spec:
envFrom:
- configMapRef:
name: {{ .Values.conf.configmap | quote }}
{{- if .Values.conf.onPremEnabled }}
{{- if .Values.global.onPremEnabled }}
- secretRef:
name: {{ .Values.conf.rabbitmqSecretName | quote }}
- secretRef:
......
{{- if .Values.conf.onPremEnabled }}
{{- if .Values.global.onPremEnabled }}
apiVersion: v1
kind: ServiceAccount
metadata:
......
......@@ -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 }}
......
......@@ -9,7 +9,7 @@ data:
LOG_LEVEL: {{ .Values.data.logLevel | quote }}
SPRING_PROFILES_ACTIVE: {{ .Values.data.springProfilesActive | quote }}
SUBSCRIBER_PRIVATE_KEY_ID: {{ .Values.data.subscriberPrivateKeyId | quote }}
{{- if not .Values.conf.onPremEnabled }}
{{- if not .Values.global.onPremEnabled }}
GOOGLE_CLOUD_PROJECT: {{ .Values.data.googleCloudProject | quote }}
ENTITLEMENTS_HOST: {{ .Values.data.entitlementsHost | quote }}
RECORDS_CHANGE_PUBSUB_ENDPOINT: "{{ .Values.data.recordsChangePubsubEndpoint}}"
......
......@@ -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 }}
......
......@@ -2,6 +2,10 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
domain: ""
onPremEnabled: false
data:
#Configmap
logLevel: "ERROR"
......@@ -31,8 +35,6 @@ conf:
registerKeycloakSecretName: "register-keycloak-secret"
registerKmsSecretName: "register-kms-secret"
appName: "register"
onPremEnabled: false
domain: ""
istio:
proxyCPU: "10m"
......
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