Skip to content

Commit 1e072ac

Browse files
committed
chore(charts): use condition
1 parent 5f68458 commit 1e072ac

11 files changed

Lines changed: 3635 additions & 68421 deletions

File tree

charts/grafana/templates/_helpers.tmpl

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ env:
55
valueFrom:
66
fieldRef:
77
fieldPath: metadata.namespace
8-
{{- if eq .Values.global.prometheusLocation "off-cluster" }}
8+
{{- if .Values.prometheusUrl }}
99
- name: "PROMETHEUS_URL"
10-
valueFrom:
11-
secretKeyRef:
12-
name: prometheus-creds
13-
key: url
14-
{{- else }}
10+
value: "{{ .Values.prometheusUrl }}"
11+
{{- else if .Values.prometheus.enabled }}
1512
- name: "PROMETHEUS_USERNAME"
1613
valueFrom:
1714
secretKeyRef:
@@ -47,7 +44,7 @@ env:
4744
{{- else }}
4845
value: http://drycc-grafana.{{ .Values.global.platformDomain }}
4946
{{- end }}
50-
{{- if eq .Values.global.passportLocation "on-cluster"}}
47+
{{- if .Values.passport.enabled}}
5148
- name: "DRYCC_PASSPORT_URL"
5249
{{- if .Values.global.certManagerEnabled }}
5350
value: https://drycc-passport.{{ .Values.global.platformDomain }}
@@ -72,16 +69,16 @@ env:
7269
- name: DRYCC_PASSPORT_SECRET
7370
value: "{{ .Values.passportSecret }}"
7471
{{- end }}
75-
- name: "PROMETHEUS_LOCATION"
76-
value: {{ .Values.global.prometheusLocation }}
7772
- name: "VALKEY_LOCATION"
78-
value: {{ .Values.global.valkeyLocation }}
73+
value: {{ ternary "on-cluster" "off-cluster" .Values.valkey.enabled }}
7974
- name: "STORAGE_LOCATION"
80-
value: {{ .Values.global.storageLocation }}
75+
value: {{ ternary "on-cluster" "off-cluster" .Values.storage.enabled }}
8176
- name: "DATABASE_LOCATION"
82-
value: {{ .Values.global.databaseLocation }}
77+
value: {{ ternary "on-cluster" "off-cluster" .Values.database.enabled }}
8378
- name: "PASSPORT_LOCATION"
84-
value: {{ .Values.global.passportLocation }}
79+
value: {{ ternary "on-cluster" "off-cluster" .Values.passport.enabled }}
8580
- name: "REGISTRY_LOCATION"
86-
value: {{ .Values.global.registryLocation }}
81+
value: {{ ternary "on-cluster" "off-cluster" .Values.registry.enabled }}
82+
- name: "PROMETHEUS_LOCATION"
83+
value: {{ ternary "on-cluster" "off-cluster" .Values.prometheus.enabled }}
8784
{{- end }}

charts/grafana/templates/grafana-deployment.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if eq .Values.global.grafanaLocation "on-cluster" }}
21
apiVersion: apps/v1
32
kind: Deployment
43
metadata:
@@ -61,4 +60,3 @@ spec:
6160
persistentVolumeClaim:
6261
claimName: drycc-grafana
6362
{{- end }}
64-
{{- end }}

charts/grafana/templates/grafana-svc.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if eq .Values.global.grafanaLocation "on-cluster" }}
21
apiVersion: v1
32
kind: Service
43
metadata:
@@ -17,4 +16,3 @@ spec:
1716
targetPort: grafana
1817
selector:
1918
app: drycc-grafana
20-
{{- end }}

charts/grafana/values.yaml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,33 @@ environment:
5555
passportUrl: ""
5656
passportKey: ""
5757
passportSecret: ""
58+
# prometheusUrl is will no longer use the built-in prometheus component
59+
prometheusUrl: ""
5860

5961
valkey:
62+
enabled: true
6063
replicas: 1
6164
port: "6379"
6265

66+
grafana:
67+
enabled: true
68+
69+
storage:
70+
enabled: true
71+
72+
database:
73+
enabled: true
74+
75+
registry:
76+
enabled: true
77+
78+
passport:
79+
enabled: true
80+
81+
prometheus:
82+
enabled: true
83+
6384
global:
64-
# Set the location of Workflow's component cluster
65-
#
66-
# Valid values are:
67-
# - on-cluster: Run component within the Kubernetes cluster
68-
# - off-cluster: component is running outside of the cluster and credentials and connection information will be provided.
69-
valkeyLocation: "on-cluster"
70-
grafanaLocation: "on-cluster"
71-
storageLocation: "on-cluster"
72-
databaseLocation: "on-cluster"
73-
passportLocation: "on-cluster"
74-
registryLocation: "on-cluster"
75-
prometheusLocation: "on-cluster"
76-
ingressClass: ""
7785
# A domain name consists of one or more parts.
7886
# Periods (.) are used to separate these parts.
7987
# Each part must be 1 to 63 characters in length and can contain lowercase letters, digits, and hyphens (-).

0 commit comments

Comments
 (0)