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

[GONRG-6649] Define global vars in schema

parent 5a224161
No related branches found
No related tags found
1 merge request!461[GONRG-6649] Define global vars in schema
Pipeline #173035 failed
......@@ -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 |
......@@ -59,9 +66,7 @@ First you need to set variables in **values.yaml** file using any code editor. S
**conf.appName** | name of the app | string | `schema` | yes
**conf.bootstrapSecretName** | secret for bootstrap | string | `datafier-secret` | yes
**conf.configmap** | configmap to be used | string | `schema-config` | yes
**conf.domain** | your domain | string | - | yes
**conf.minioSecretName** | secret for minio | string | `schema-minio-secret` | yes
**conf.onPremEnabled** | whether on-prem is enabled | boolean | false | yes
**conf.postgresSecretName** | secret for postgres | string | `schema-postgres-secret` | yes
**conf.rabbitmqSecretName** | secret for rabbitmq | string | `rabbitmq-secret` | yes
......
......@@ -7,7 +7,7 @@ metadata:
namespace: {{ .Release.Namespace | quote }}
data:
DATA_PARTITION: {{ .Values.data.dataPartitionId | quote }}
ONPREM_ENABLED: {{ .Values.conf.onPremEnabled | quote }}
ONPREM_ENABLED: {{ .Values.global.onPremEnabled | quote }}
ENABLE_CLEANUP: {{ .Values.data.enableCleanup | quote }}
SCHEMA_URL: {{ .Values.data.schemaHost | quote }}
ENTITLEMENTS_HOST: {{ .Values.data.entitlementsHost | quote }}
......
......@@ -33,7 +33,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 }}
......
......@@ -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:
......
{{- 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 }}
......
......@@ -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 }}
......
global:
domain: ""
onPremEnabled: false
data:
#Configmaps
dataPartitionId: ""
......@@ -28,9 +32,7 @@ conf:
appName: "schema"
bootstrapSecretName: "datafier-secret"
configmap: "schema-config"
domain: ""
minioSecretName: "schema-minio-secret"
onPremEnabled: false
postgresSecretName: "schema-postgres-secret"
rabbitmqSecretName: "rabbitmq-secret"
......
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