Skip to content

Commit 063b1a7

Browse files
authored
Merge pull request #182 from alvarolop/main
πŸš‘οΈ Quick fix for the Helm Chart πŸš‘οΈ
2 parents b85f636 + ca42c7f commit 063b1a7

7 files changed

Lines changed: 18 additions & 78 deletions

File tree

β€Žtooling/charts/tl500-base/templates/_helpers.tplβ€Ž

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -90,51 +90,3 @@
9090
{{- print "example.com" -}}
9191
{{- end -}}
9292
{{- end -}}
93-
94-
{{- define "gitlab.root_password" -}}
95-
{{- $secretName := (printf "%v-credentials" .Values.gitlab.app_name) -}}
96-
{{- $password := default (randAlphaNum 10) .Values.gitlab.credentials.root_password }}
97-
{{- if not .Values.gitlab.credentials.root_password }}
98-
{{- $existingSecret := (lookup "v1" "Secret" .Values.gitlab.namespace $secretName) }}
99-
{{- if $existingSecret }}
100-
{{- $password = index $existingSecret.data "root_password" | b64dec }}
101-
{{- end -}}
102-
{{- end -}}
103-
{{- print $password -}}
104-
{{- end -}}
105-
106-
{{- define "gitlab.postgres.user" -}}
107-
{{- $secretName := (printf "%v-credentials" .Values.gitlab.app_name) -}}
108-
{{- $username := default (randAlphaNum 10) .Values.gitlab.credentials.postgres_user }}
109-
{{- if not .Values.gitlab.credentials.postgres_user }}
110-
{{- $existingSecret := (lookup "v1" "Secret" .Values.gitlab.namespace $secretName) }}
111-
{{- if $existingSecret }}
112-
{{- $username = index $existingSecret.data "postgres_user" | b64dec }}
113-
{{- end -}}
114-
{{- end -}}
115-
{{- print $username -}}
116-
{{- end -}}
117-
118-
{{- define "gitlab.postgres.password" -}}
119-
{{- $secretName := (printf "%v-credentials" .Values.gitlab.app_name) -}}
120-
{{- $password := default (randAlphaNum 10) .Values.gitlab.credentials.postgres_password }}
121-
{{- if not .Values.gitlab.credentials.postgres_password }}
122-
{{- $existingSecret := (lookup "v1" "Secret" .Values.gitlab.namespace $secretName) }}
123-
{{- if $existingSecret }}
124-
{{- $password = index $existingSecret.data "postgres_password" | b64dec }}
125-
{{- end -}}
126-
{{- end -}}
127-
{{- print $password -}}
128-
{{- end -}}
129-
130-
{{- define "gitlab.postgres.admin_password" -}}
131-
{{- $secretName := (printf "%v-credentials" .Values.gitlab.app_name) -}}
132-
{{- $password := default (randAlphaNum 10) .Values.gitlab.credentials.postgres_admin_password }}
133-
{{- if not .Values.gitlab.credentials.postgres_admin_password }}
134-
{{- $existingSecret := (lookup "v1" "Secret" .Values.gitlab.namespace $secretName) }}
135-
{{- if $existingSecret }}
136-
{{- $password = index $existingSecret.data "postgres_admin_password" | b64dec }}
137-
{{- end -}}
138-
{{- end -}}
139-
{{- print $password -}}
140-
{{- end -}}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{- if .Values.gitlab -}}
2+
{{ $root_pass := include "gitlab.ldap.bind_password" . }}
3+
---
4+
apiVersion: v1
5+
kind: Secret
6+
metadata:
7+
name: "gitlab-ldap-password"
8+
namespace: "{{ .Values.gitlab.namespace }}"
9+
annotations:
10+
"helm.sh/resource-policy": "keep"
11+
type: Opaque
12+
data:
13+
password: {{ $root_pass | b64enc | quote }}
14+
immutable: true
15+
{{- end }}

β€Žtooling/charts/tl500-base/templates/gitlab/secrets.yamlβ€Ž

Lines changed: 0 additions & 18 deletions
This file was deleted.

β€Žtooling/charts/tl500-base/templates/tl500-rbac.yamlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ subjects:
9393
apiVersion: rbac.authorization.k8s.io/v1
9494
kind: RoleBinding
9595
metadata:
96-
name: tl500-gitlab-view
97-
namespace: tl500-gitlab
96+
name: gitlab-system-view
97+
namespace: gitlab-system
9898
roleRef:
9999
apiGroup: rbac.authorization.k8s.io
100100
kind: ClusterRole

β€Žtooling/charts/tl500-base/values.yamlβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ ipa_namespace: ipa
1212
namespaces:
1313
- name: tl500-workspaces
1414
- name: tl500-tech-exercise
15-
- name: tl500-gitlab
1615
- name: tl500-shared
1716
- name: tl500-minio
1817
- name: gitlab-system

β€Žtooling/charts/tl500-course-content/templates/gitlab/gitlab-tl500.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
namespace: gitlab-system
77
spec:
88
chart:
9-
version: "9.5.2" # https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/blob/<OPERATOR_VERSION>/CHART_VERSIONS
9+
version: "9.6.0" # https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/blob/<OPERATOR_VERSION>/CHART_VERSIONS
1010
values:
1111
nginx-ingress:
1212
enabled: false

β€Žtooling/charts/tl500-course-content/templates/gitlab/secret.yamlβ€Ž

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
Β (0)