Skip to content

Commit

Permalink
update osartifact helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Jan 17, 2025
1 parent bd0806c commit 7c34046
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/osartifact/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
name: osartifact
description: A Helm chart for OSArtifact CRD deployment
type: application
version: 0.2.0
version: 0.3.0
10 changes: 8 additions & 2 deletions charts/osartifact/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{{ $tokenSecret := (lookup "v1" "Secret" .Release.Namespace .Values.tokenSecret.name) }}
{{ $passwordSecret := (lookup "v1" "Secret" .Release.Namespace .Values.passwordSecret.name) }}

{{- if and $tokenSecret $passwordSecret }}

{{ $token := index $tokenSecret.data .Values.tokenSecret.key | b64dec }}
{{ $password := index $passwordSecret.data .Values.passwordSecret.key | b64dec }}

kind: Secret
apiVersion: v1
metadata:
Expand All @@ -12,7 +17,7 @@ stringData:
users:
- name: {{ .Values.username }}
passwd: {{ index $passwordSecret .Values.passwordSecret.key }}
passwd: {{ $password }}
{{- with .Values.defaultUser }}
groups: [
{{- range .groups -}}
Expand Down Expand Up @@ -68,10 +73,11 @@ stringData:
{{- end }}
plural:
token: {{ index $tokenSecret .Values.tokenSecret.key }}
token: {{ $token }}
url: {{ .Values.url }}
{{- if .Values.extraUserCloudConfig }}
{{ .Values.extraCloudConfig | toYaml | nindent 4 }}
{{- end }}
{{- end}}

0 comments on commit 7c34046

Please sign in to comment.