Skip to content

Commit 5ccd273

Browse files
committed
chore(charts): use condition
1 parent 3a7743f commit 5ccd273

11 files changed

Lines changed: 0 additions & 36 deletions

charts/database/templates/_helper.tpl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{{- define "database.envs" }}
22
env:
3-
- name: DATABASE_STORAGE
4-
value: "{{.Values.global.storage}}"
53
{{- if eq .Values.debug "true" }}
64
- name: PATRONI_LOG_LEVEL
75
value: DEBUG

charts/database/templates/database-clusterrole.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if eq .Values.global.databaseLocation "on-cluster" }}
21
apiVersion: rbac.authorization.k8s.io/v1
32
kind: ClusterRole
43
metadata:
@@ -12,4 +11,3 @@ rules:
1211
- kubernetes
1312
verbs:
1413
- get
15-
{{- end }}

charts/database/templates/database-clusterrolebinding.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if eq .Values.global.databaseLocation "on-cluster" }}
21
apiVersion: rbac.authorization.k8s.io/v1
32
kind: ClusterRoleBinding
43
metadata:
@@ -11,4 +10,3 @@ subjects:
1110
- kind: ServiceAccount
1211
name: drycc-database
1312
namespace: {{ .Release.Namespace }}
14-
{{- end }}

charts/database/templates/database-role-binding.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if eq .Values.global.databaseLocation "on-cluster" }}
21
apiVersion: rbac.authorization.k8s.io/v1
32
kind: RoleBinding
43
metadata:
@@ -10,4 +9,3 @@ roleRef:
109
subjects:
1110
- kind: ServiceAccount
1211
name: drycc-database
13-
{{- end }}

charts/database/templates/database-role.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if eq .Values.global.databaseLocation "on-cluster" }}
21
apiVersion: rbac.authorization.k8s.io/v1
32
kind: Role
43
metadata:
@@ -53,4 +52,3 @@ rules:
5352
- services
5453
verbs:
5554
- create
56-
{{- end }}

charts/database/templates/database-secret-creds.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{ if eq .Values.global.databaseLocation "on-cluster"}}
21
apiVersion: v1
32
kind: Secret
43
metadata:
@@ -13,4 +12,3 @@ data:
1312
replicator-password: {{ include "common.secrets.lookup" (dict "secret" "database-creds" "key" "replicator-password" "defaultValue" (.Values.replicatorPassword | default (randAlphaNum 32) | lower) "context" $) }}
1413
user: {{ include "common.secrets.lookup" (dict "secret" "database-creds" "key" "user" "defaultValue" (.Values.user | default (randAlpha 32) | lower) "context" $) }}
1514
password: {{ include "common.secrets.lookup" (dict "secret" "database-creds" "key" "password" "defaultValue" (.Values.password | default (randAlphaNum 32)) "context" $) }}
16-
{{- end }}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
{{- if eq .Values.global.databaseLocation "on-cluster" }}
21
apiVersion: v1
32
kind: ServiceAccount
43
metadata:
54
name: drycc-database
65
labels:
76
heritage: drycc
8-
{{- end }}

charts/database/templates/database-service-replica.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if eq .Values.global.databaseLocation "on-cluster" }}
21
apiVersion: v1
32
kind: Service
43
metadata:
@@ -20,4 +19,3 @@ spec:
2019
selector:
2120
app: drycc-database
2221
role: replica
23-
{{- end }}

charts/database/templates/database-service.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if eq .Values.global.databaseLocation "on-cluster" }}
21
apiVersion: v1
32
kind: Service
43
metadata:
@@ -14,4 +13,3 @@ spec:
1413
ports:
1514
- port: 5432
1615
targetPort: 5432
17-
{{- end }}

charts/database/templates/database-statefulset.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if eq .Values.global.databaseLocation "on-cluster" }}
21
apiVersion: apps/v1
32
kind: StatefulSet
43
metadata:
@@ -97,4 +96,3 @@ spec:
9796
- name: database-data
9897
emptyDir: {}
9998
{{- end }}
100-
{{- end }}

0 commit comments

Comments
 (0)