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

[GONRG-6649] Define global vars in legal

parent 7213a49b
No related branches found
No related tags found
3 merge requests!438Draft: CG Vulnerability for Woodstox - CVE-2022-40151,!430Upgraded Version of spring-security-config due to Component Governance CVE-2023-34034,!378[GONRG-6649] Define global vars in legal
Pipeline #173023 failed
......@@ -45,7 +45,7 @@ This example describes installation in **Development mode**:
`kubectl get namespace <namespace> -o jsonpath={.metadata.labels}`
The output shows that there are no any labels related to Istio:
```console
{"kubernetes.io/metadata.name":"default"}
```
......@@ -92,6 +92,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 |
......@@ -128,10 +135,8 @@ First you need to set variables in **values.yaml** file using any code editor. S
**conf.postgresSecretName** | Secret name for postgres service | string | legal-postgres-secret | yes
**conf.rabbitmqSecretName** | Secret name for rabbitmq service | string | rabbitmq-secret | yes
**conf.bootstrapSecretName** | Secret name for bootstrap | string | datafier-secret | yes
**conf.onPremEnabled** | whether on-prem is enabled | boolean | false | yes
**conf.istionEnabled** | whether enable istio resources | boolean | true | yes
**conf.bootstrapEnabled** | whether bootstrap is enabled | boolean | false | yes
**conf.domain** | your domain | string | - | yes
### Istio variables
......
......@@ -34,7 +34,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 }}
......
......@@ -11,5 +11,5 @@ data:
ENTITLEMENTS_HOST: {{ .Values.data.entitlementsHost | quote }}
LEGAL_HOST: {{ .Values.data.legalHost | quote }}
DEFAULT_LEGAL_TAG: {{ .Values.data.defaultLegalTag | quote }}
ONPREM_ENABLED: {{ .Values.conf.onPremEnabled | quote }}
ONPREM_ENABLED: {{ .Values.global.onPremEnabled | 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:
......
......@@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ .Values.conf.appName | quote }}
{{- if not .Values.conf.onPremEnabled }}
{{- if not .Values.global.onPremEnabled }}
annotations:
cloud.google.com/neg: '{"ingress": true}'
{{- end }}
......
......@@ -6,10 +6,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:
# configmaps
logLevel: "ERROR"
......@@ -29,10 +33,8 @@ conf:
postgresSecretName: "legal-postgres-secret"
rabbitmqSecretName: "rabbitmq-secret"
bootstrapSecretName: "datafier-secret"
onPremEnabled: false
istioEnabled: true
bootstrapEnabled: 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