feat: allow manually setting password modification time (#207)

Automatically setting password modification time to the current time leads to
it changing every time the chart is rendered. Ironically, this is a problem
when Argo CD manages itself using this chart ;-)
pull/221/head
Yann Soubeyrand 2020-01-27 23:28:58 +01:00 committed by Sean Johnson
parent 0b70afc93a
commit 3b3a2c86b3
4 changed files with 6 additions and 2 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.4.1"
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd
version: 1.6.6
version: 1.7.0
home: https://github.com/argoproj/argo-helm
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
keywords:

View File

@ -41,6 +41,8 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i
| nameOverride | Provide a name in place of `argocd` | `"argocd"` |
| installCRDs | bool | `true` | Install CRDs if you are using Helm2. |
| configs.knownHosts.data.ssh_known_hosts | Known Hosts | See [values.yaml](values.yaml) |
| configs.secret.argocdServerAdminPassword | Admin password | `null` |
| configs.secret.argocdServerAdminPasswordMtime | Admin password modification time | `date "2006-01-02T15:04:05Z" now` if configs.secret.argocdServerAdminPassword is set |
| configs.secret.bitbucketSecret | BitBucket incoming webhook secret | `""` |
| configs.secret.createSecret | Create the argocd-secret. | `true` |
| configs.secret.githubSecret | GitHub incoming webhook secret | `""` |

View File

@ -35,7 +35,7 @@ data:
{{- end }}
{{- if .Values.configs.secret.argocdServerAdminPassword }}
admin.password: {{ .Values.configs.secret.argocdServerAdminPassword | b64enc }}
admin.passwordMtime: {{ date "2006-01-02T15:04:05Z" now | b64enc }}
admin.passwordMtime: {{ default (date "2006-01-02T15:04:05Z" now) .Values.configs.secret.argocdServerAdminPasswordMtime | b64enc }}
{{- end }}
{{- range $key, $value := .Values.configs.secret.extra }}
{{ $key }}: {{ $value | b64enc }}

View File

@ -742,3 +742,5 @@ configs:
# Argo expects the password in the secret to be bcrypt hashed. You can create this hash with
# `htpasswd -nbBC 10 "" $ARGO_PWD | tr -d ':\n' | sed 's/$2y/$2a/'`
# argocdServerAdminPassword:
# Password modification time defaults to current time if not set
# argocdServerAdminPasswordMtime: "2006-01-02T15:04:05Z"