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

Merge branch 'okosse' into 'master'

[GONRG-6649] Define global vars in indexer

See merge request !509
parents ad3f5812 bb13eed5
No related branches found
No related tags found
1 merge request!509[GONRG-6649] Define global vars in indexer
Pipeline #174870 passed
...@@ -25,6 +25,13 @@ Packages are only needed for installation from a local computer. ...@@ -25,6 +25,13 @@ Packages are only needed for installation from a local computer.
Before installing deploy Helm chart you need to install [configmap Helm chart](../configmap). Before installing deploy Helm chart you need to install [configmap Helm chart](../configmap).
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 |
...@@ -61,8 +68,6 @@ First you need to set variables in **values.yaml** file using any code editor. S ...@@ -61,8 +68,6 @@ First you need to set variables in **values.yaml** file using any code editor. S
**conf.elasticSecretName** | secret for elastic | string | `indexer-elastic-secret` | yes **conf.elasticSecretName** | secret for elastic | string | `indexer-elastic-secret` | yes
**conf.keycloakSecretName** | secret for keycloak | string | `indexer-keycloak-secret` | yes **conf.keycloakSecretName** | secret for keycloak | string | `indexer-keycloak-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
**conf.indexerRedisSecretName** | indexer Redis secret that contains redis password with REDIS_PASSWORD key | string | `indexer-redis-secret` | yes **conf.indexerRedisSecretName** | indexer Redis secret that contains redis password with REDIS_PASSWORD key | string | `indexer-redis-secret` | yes
### ISTIO variables ### ISTIO variables
......
...@@ -41,7 +41,7 @@ spec: ...@@ -41,7 +41,7 @@ spec:
name: {{ .Values.conf.configmap | quote }} name: {{ .Values.conf.configmap | quote }}
- secretRef: - secretRef:
name: {{ .Values.conf.elasticSecretName | quote }} name: {{ .Values.conf.elasticSecretName | quote }}
{{- if .Values.conf.onPremEnabled }} {{- if .Values.global.onPremEnabled }}
- secretRef: - secretRef:
name: {{ .Values.conf.keycloakSecretName | quote }} name: {{ .Values.conf.keycloakSecretName | quote }}
- secretRef: - secretRef:
......
{{- if .Values.conf.onPremEnabled }} {{- if .Values.global.onPremEnabled }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
......
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
{{- if not .Values.conf.onPremEnabled }} {{- if not .Values.global.onPremEnabled }}
annotations: annotations:
cloud.google.com/neg: '{"ingress": true}' cloud.google.com/neg: '{"ingress": true}'
{{- end }} {{- end }}
......
...@@ -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
entitlementsHost: "http://entitlements" entitlementsHost: "http://entitlements"
...@@ -30,8 +34,6 @@ conf: ...@@ -30,8 +34,6 @@ conf:
elasticSecretName: "indexer-elastic-secret" elasticSecretName: "indexer-elastic-secret"
keycloakSecretName: "indexer-keycloak-secret" keycloakSecretName: "indexer-keycloak-secret"
rabbitmqSecretName: "rabbitmq-secret" rabbitmqSecretName: "rabbitmq-secret"
onPremEnabled: false
domain: ""
indexerRedisSecretName: "indexer-redis-secret" indexerRedisSecretName: "indexer-redis-secret"
istio: istio:
......
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