Skip to content

Commit

Permalink
chore: move harbor credential into secret
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Jan 13, 2025
1 parent 43e7e0c commit e2f2094
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/lagoon-build-deploy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ kubeVersion: ">= 1.25.0-0"

type: application

version: 0.31.1
version: 0.32.0

appVersion: v0.21.0

annotations:
artifacthub.io/changes: |
- kind: changed
description: fix servicemonitor for lagoon build metrics
description: move harbor credentials into secret
artifacthub.io/crds: |
- kind: LagoonBuild
version: v1beta2
Expand Down
14 changes: 12 additions & 2 deletions charts/lagoon-build-deploy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ spec:
- "--leader-elect=true"
{{- if .Values.harbor.enabled }}
- "--enable-harbor=true"
- "--harbor-password={{ .Values.harbor.adminPassword }}"
- "--harbor-username={{ .Values.harbor.adminUser }}"
- "--harbor-url={{ .Values.harbor.host }}"
- "--harbor-api={{ .Values.harbor.host }}/api"
{{- if .Values.harbor.rotationCron }}
Expand Down Expand Up @@ -253,6 +251,18 @@ spec:
secretKeyRef:
name: {{ include "lagoon-build-deploy.fullname" . }}
key: RABBITMQ_USERNAME
{{- if .Values.harbor.enabled }}
- name: HARBOR_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "lagoon-build-deploy.fullname" . }}
key: HARBOR_PASSWORD
- name: HARBOR_USERNAME
valueFrom:
secretKeyRef:
name: {{ include "lagoon-build-deploy.fullname" . }}
key: HARBOR_USERNAME
{{- end }}
- name: NAMESPACE_PREFIX
value: {{ .Values.namespacePrefix | quote }}
- name: CONTROLLER_NAMESPACE
Expand Down
4 changes: 4 additions & 0 deletions charts/lagoon-build-deploy/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ metadata:
stringData:
RABBITMQ_PASSWORD: {{ required "A valid rabbitMQPassword required!" $rabbitMQPassword | quote }}
RABBITMQ_USERNAME: {{ required "A valid rabbitMQUsername required!" $rabbitMQUsername | quote }}
{{- if .Values.harbor.enabled }}
HARBOR_PASSWORD: {{ .Values.harbor.adminPassword | quote }}
HARBOR_USERNAME: {{ .Values.harbor.adminUser | quote }}
{{- end }}

0 comments on commit e2f2094

Please sign in to comment.