From 4ad5cf1d19778375c654339a3f4b306136c933ed Mon Sep 17 00:00:00 2001 From: sanigo Date: Fri, 22 Jan 2021 16:24:37 +0800 Subject: [PATCH] =?UTF-8?q?Add=20sshPublicKeyAttribute=20attribute=20setti?= =?UTF-8?q?ng=20for=20ldap=20auth=EF=BC=8Cand=20Allow=20setting=20labels?= =?UTF-8?q?=20and=20annotations=20for=20gitea=20pvc.=20(#76)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. sshPublicKeyAttribute is useful to sync ssh public keys from ldap. 2. It would be easier to set pvc annotations/labels for those who are using storage services from cloud providers. Co-authored-by: 钱卫春 Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/76 Reviewed-by: techknowlogick Reviewed-by: luhahn Co-authored-by: sanigo Co-committed-by: sanigo --- README.md | 3 +++ templates/gitea/statefulset.yaml | 12 ++++++++++++ values.yaml | 3 +++ 3 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 271dc4f..c9ca59a 100644 --- a/README.md +++ b/README.md @@ -267,6 +267,7 @@ camelCase: bindDn: CN=ldap read,OU=Spezial,DC=example,DC=com bindPassword: JustAnotherBindPw usernameAttribute: CN + sshPublicKeyAttribute: sshPublicKey ``` kebab-case: @@ -344,6 +345,8 @@ Annotations can be added to the Gitea pod. |persistence.size| Size for persistence to store repo information | 10Gi | |persistence.accessModes|AccessMode for persistence|| |persistence.storageClass|Storage class for repository persistence|| +|persistence.labels|Labels for the persistence volume claim to be created|{}| +|persistence.annotations|Annotations for the persistence volume claim to be created|{}| ### Ingress diff --git a/templates/gitea/statefulset.yaml b/templates/gitea/statefulset.yaml index c068279..245b716 100644 --- a/templates/gitea/statefulset.yaml +++ b/templates/gitea/statefulset.yaml @@ -127,6 +127,18 @@ spec: volumeClaimTemplates: - metadata: name: data + {{- with .Values.persistence.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + {{- with .Values.persistence.labels }} + labels: + {{- range $key, $value := . }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} spec: accessModes: {{- range .Values.persistence.accessModes }} diff --git a/values.yaml b/values.yaml index 72dc078..390196c 100644 --- a/values.yaml +++ b/values.yaml @@ -73,6 +73,8 @@ persistence: size: 10Gi accessModes: - ReadWriteOnce + labels: {} + annotations: {} # additional volumes to add to the Gitea statefulset. extraVolumes: @@ -123,6 +125,7 @@ gitea: #bindDn: #bindPassword: #usernameAttribute: + #sshPublicKeyAttribute: config: {} # APP_NAME: "Gitea: Git with a cup of tea"