From a758b0f2bb1c0ae9838ab650202f1a205bca075a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20R=2E=20de=20Miranda?= Date: Tue, 26 Feb 2019 07:13:02 -0300 Subject: [PATCH] [incubator/gogs] Features added in gogs (#11652) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Features added in gogs * Gogs version 0.11.86 * Added mailer * Added nodeSelector, affinity, tolerations * Added existing persistence volume Signed-off-by: André R. de Miranda * Fixed: Added the key existingClaim in values.yaml Signed-off-by: André R. de Miranda --- incubator/gogs/Chart.yaml | 4 +-- incubator/gogs/README.md | 2 +- incubator/gogs/templates/configmap.yaml | 12 +++++++ incubator/gogs/templates/deployment.yaml | 16 ++++++++++ incubator/gogs/templates/pvc.yaml | 2 +- incubator/gogs/values.yaml | 40 +++++++++++++++++++++++- 6 files changed, 71 insertions(+), 5 deletions(-) diff --git a/incubator/gogs/Chart.yaml b/incubator/gogs/Chart.yaml index cde1ac6d66..778c1c3d4b 100644 --- a/incubator/gogs/Chart.yaml +++ b/incubator/gogs/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 description: 'Gogs: Go Git Service' name: gogs -version: 0.7.6 -appVersion: 0.11.79 +version: 0.7.7 +appVersion: 0.11.86 home: https://gogs.io/ icon: https://gogs.io/img/favicon.ico maintainers: diff --git a/incubator/gogs/README.md b/incubator/gogs/README.md index 2b88b6bde5..32f25fc22d 100644 --- a/incubator/gogs/README.md +++ b/incubator/gogs/README.md @@ -44,7 +44,7 @@ chart and their default values. | Parameter | Description | Default | | ----------------------- | ---------------------------------- | ---------------------------------------------------------- | | `image.repository` | Gogs image | `gogs/gogs` | -| `image.tag` | Gogs image tag | `0.11.66` | +| `image.tag` | Gogs image tag | `0.11.86` | | `image.pullPolicy` | Gogs image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | | `postgresql.install` | Weather or not to install PostgreSQL dependency | `true` | | `postgresql.postgresHost` | PostgreSQL host (if `postgresql.install == false`) | `nil` | diff --git a/incubator/gogs/templates/configmap.yaml b/incubator/gogs/templates/configmap.yaml index 56835e8ce3..d6148c4ef8 100644 --- a/incubator/gogs/templates/configmap.yaml +++ b/incubator/gogs/templates/configmap.yaml @@ -39,6 +39,18 @@ data: ENABLE_REVERSE_PROXY_AUTHENTICATION = false ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false + [mailer] + ENABLED = {{ .Values.service.gogs.mailerEnabled }} + HOST = {{ .Values.service.gogs.mailerHost }} + DISABLE_HELO = false + HELO_HOSTNAME = + SKIP_VERIFY = {{ .Values.service.gogs.mailerSkipVerify }} + SUBJECT_PREFIX = {{ .Values.service.gogs.mailerSubjectPrefix }} + FROM = {{ .Values.service.gogs.mailerFrom }} + USER = {{ .Values.service.gogs.mailerUser }} + PASSWD = {{ .Values.service.gogs.mailerPasswd }} + USE_PLAIN_TEXT = text/plain + [database] DB_TYPE = {{ .Values.service.gogs.databaseType | quote }} HOST = {{ template "gogs.database.host" . }} diff --git a/incubator/gogs/templates/deployment.yaml b/incubator/gogs/templates/deployment.yaml index d0cd877627..e126018443 100644 --- a/incubator/gogs/templates/deployment.yaml +++ b/incubator/gogs/templates/deployment.yaml @@ -19,6 +19,18 @@ spec: {{- with .Values.securityContext }} securityContext: {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 8 }} {{- end }} containers: - name: {{ .Chart.Name }} @@ -56,7 +68,11 @@ spec: - name: data {{- if .Values.persistence.enabled }} persistentVolumeClaim: + {{- if .Values.persistence.existingClaim }} + claimName: {{ .Values.persistence.existingClaim }} + {{- else }} claimName: {{ template "gogs.fullname" . }} + {{- end -}} {{- else }} emptyDir: {} {{- end -}} diff --git a/incubator/gogs/templates/pvc.yaml b/incubator/gogs/templates/pvc.yaml index 458bc40f43..56ccae8005 100644 --- a/incubator/gogs/templates/pvc.yaml +++ b/incubator/gogs/templates/pvc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.persistence.enabled }} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/incubator/gogs/values.yaml b/incubator/gogs/values.yaml index fb7ebe0dc5..4dbf4fdc07 100644 --- a/incubator/gogs/values.yaml +++ b/incubator/gogs/values.yaml @@ -11,7 +11,7 @@ replicaCount: 1 image: repository: gogs/gogs - tag: 0.11.79 + tag: 0.11.86 pullPolicy: IfNotPresent service: @@ -105,6 +105,34 @@ service: ## serviceEnableNotifyMail: false + ## Enable this to send mail with SMTP server. + ## + mailerEnabled: false + + ## SMTP server host. + ## + mailerHost: + + ## SMTP server user. + ## + mailerUser: + + ## SMTP server password. + ## + mailerPasswd: + + ## Mail from address. Format RFC 5322, email@example.com, or "Name" + ## + mailerFrom: + + ## Prefix prepended mail subject. + ## + mailerSubjectPrefix: + + ## Do not verify the self-signed certificates. + ## + mailerSkipVerify: false + ## Either "memory", "redis", or "memcache", default is "memory" ## cacheAdapter: memory @@ -294,6 +322,10 @@ persistence: ## enabled: true + ## If defined, PVC must be created manually before volume will be bound + ## + # existingClaim: "-" + ## gogs data Persistent Volume Storage Class ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning @@ -340,5 +372,11 @@ postgresql: ## Enable PostgreSQL persistence using Persistent Volume Claims. ## enabled: true + ## Security context securityContext: {} + +## Node, affinity and tolerations labels for pod assignment +nodeSelector: {} +affinity: {} +tolerations: []