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. ...@@ -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. 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 ### Configmap variables
| Name | Description | Type | Default |Required | | Name | Description | Type | Default |Required |
...@@ -65,8 +72,6 @@ First you need to set variables in **values.yaml** file using any code editor. S ...@@ -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.registerKeycloakSecretName** | secret for keycloak | string | register-keycloak-secret | yes
**conf.registerKmsSecretName** | secret for kms | string | "register-kms-secret" | yes **conf.registerKmsSecretName** | secret for kms | string | "register-kms-secret" | yes
**conf.rabbitmqSecretName** | secret for rabbitmq | string | rabbitmq-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 ### ISTIO variables
......
...@@ -28,7 +28,7 @@ spec: ...@@ -28,7 +28,7 @@ spec:
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ .Values.conf.configmap | quote }} name: {{ .Values.conf.configmap | quote }}
{{- if .Values.conf.onPremEnabled }} {{- if .Values.global.onPremEnabled }}
- secretRef: - secretRef:
name: {{ .Values.conf.rabbitmqSecretName | quote }} name: {{ .Values.conf.rabbitmqSecretName | quote }}
- secretRef: - secretRef:
......
{{- if .Values.conf.onPremEnabled }} {{- if .Values.global.onPremEnabled }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
......
...@@ -3,7 +3,7 @@ kind: Service ...@@ -3,7 +3,7 @@ kind: Service
metadata: metadata:
name: {{ .Values.conf.appName | quote }} name: {{ .Values.conf.appName | quote }}
annotations: annotations:
{{- if not .Values.conf.onPremEnabled }} {{- if not .Values.global.onPremEnabled }}
cloud.google.com/neg: '{"ingress": true}' cloud.google.com/neg: '{"ingress": true}'
{{- end }} {{- end }}
namespace: {{ .Release.Namespace | quote }} namespace: {{ .Release.Namespace | quote }}
......
...@@ -9,7 +9,7 @@ data: ...@@ -9,7 +9,7 @@ data:
LOG_LEVEL: {{ .Values.data.logLevel | quote }} LOG_LEVEL: {{ .Values.data.logLevel | quote }}
SPRING_PROFILES_ACTIVE: {{ .Values.data.springProfilesActive | quote }} SPRING_PROFILES_ACTIVE: {{ .Values.data.springProfilesActive | quote }}
SUBSCRIBER_PRIVATE_KEY_ID: {{ .Values.data.subscriberPrivateKeyId | 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 }} GOOGLE_CLOUD_PROJECT: {{ .Values.data.googleCloudProject | quote }}
ENTITLEMENTS_HOST: {{ .Values.data.entitlementsHost | quote }} ENTITLEMENTS_HOST: {{ .Values.data.entitlementsHost | quote }}
RECORDS_CHANGE_PUBSUB_ENDPOINT: "{{ .Values.data.recordsChangePubsubEndpoint}}" RECORDS_CHANGE_PUBSUB_ENDPOINT: "{{ .Values.data.recordsChangePubsubEndpoint}}"
......
...@@ -5,10 +5,10 @@ metadata: ...@@ -5,10 +5,10 @@ metadata:
namespace: {{ .Release.Namespace | quote }} namespace: {{ .Release.Namespace | quote }}
spec: spec:
hosts: hosts:
{{- if and .Values.conf.domain .Values.conf.onPremEnabled }} {{- if and .Values.global.domain .Values.global.onPremEnabled }}
- {{ printf "osdu.%s" .Values.conf.domain | quote }} - {{ printf "osdu.%s" .Values.global.domain | quote }}
{{- else if .Values.conf.domain }} {{- else if .Values.global.domain }}
- {{ .Values.conf.domain | quote }} - {{ .Values.global.domain | quote }}
{{- else }} {{- else }}
- "*" - "*"
{{- end }} {{- end }}
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
# This is a YAML-formatted file. # This is a YAML-formatted file.
# Declare variables to be passed into your templates. # Declare variables to be passed into your templates.
global:
domain: ""
onPremEnabled: false
data: data:
#Configmap #Configmap
logLevel: "ERROR" logLevel: "ERROR"
...@@ -31,8 +35,6 @@ conf: ...@@ -31,8 +35,6 @@ conf:
registerKeycloakSecretName: "register-keycloak-secret" registerKeycloakSecretName: "register-keycloak-secret"
registerKmsSecretName: "register-kms-secret" registerKmsSecretName: "register-kms-secret"
appName: "register" appName: "register"
onPremEnabled: false
domain: ""
istio: istio:
proxyCPU: "10m" 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