diff --git a/charts/idrac6/Chart.yaml b/charts/idrac6/Chart.yaml index 016d690..5c095d3 100644 --- a/charts/idrac6/Chart.yaml +++ b/charts/idrac6/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: '0.5' description: iDRAC 6 web interface and VNC proxy name: idrac6 -version: 0.0.1 +version: 0.0.2 keywords: - dell - idrac diff --git a/charts/idrac6/ci/test-values.yaml b/charts/idrac6/ci/test-values.yaml index 116659b..f66d532 100644 --- a/charts/idrac6/ci/test-values.yaml +++ b/charts/idrac6/ci/test-values.yaml @@ -1,5 +1,5 @@ --- idrac: host: test - user: root + username: root password: calvin diff --git a/charts/idrac6/templates/deployment.yaml b/charts/idrac6/templates/deployment.yaml index 019d9a3..903eda3 100644 --- a/charts/idrac6/templates/deployment.yaml +++ b/charts/idrac6/templates/deployment.yaml @@ -62,11 +62,20 @@ spec: - name: GROUP_ID value: "{{ .Values.pgid }}" - name: IDRAC_HOST - value: "{{ .Values.idrac.host }}" + valueFrom: + secretKeyRef: + name: {{ .Values.existingSecretName | default (printf "%s-secret" (include "idrac6.fullname" .)) }} + key: idrac.host - name: IDRAC_USER - value: "{{ .Values.idrac.user }}" + valueFrom: + secretKeyRef: + name: {{ .Values.existingSecretName | default (printf "%s-secret" (include "idrac6.fullname" .)) }} + key: idrac.username - name: IDRAC_PASSWORD - value: "{{ .Values.idrac.password }}" + valueFrom: + secretKeyRef: + name: {{ .Values.existingSecretName | default (printf "%s-secret" (include "idrac6.fullname" .)) }} + key: idrac.password - name: IDRAC_PORT value: "{{ .Values.idrac.port }}" - name: IDRAC_KEYCODE_HACK diff --git a/charts/idrac6/templates/secrets.yaml b/charts/idrac6/templates/secrets.yaml new file mode 100644 index 0000000..28d16d4 --- /dev/null +++ b/charts/idrac6/templates/secrets.yaml @@ -0,0 +1,17 @@ +--- +{{- if not (.Values.existingSecretName) }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "idrac6.fullname" . }}-secret + labels: + app.kubernetes.io/name: {{ include "idrac6.name" . }} + helm.sh/chart: {{ include "idrac6.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ include "idrac6.name" . }} +type: Opaque +data: + idrac.host: {{ .Values.idrac.host | b64enc }} + idrac.username: {{ .Values.idrac.username | b64enc }} + idrac.password: {{ .Values.idrac.password | b64enc }} +{{- end }} diff --git a/charts/idrac6/values.yaml b/charts/idrac6/values.yaml index f4e89a8..8ce2ca1 100644 --- a/charts/idrac6/values.yaml +++ b/charts/idrac6/values.yaml @@ -28,11 +28,14 @@ timezone: UTC puid: 1000 pgid: 1000 +# Existing secret, overrides idrac values +# existingSecret: test + # iDRAC connection details idrac: host: - user: - password: + username: root + password: calvin port: 443 keycode_hack: false