From 5311243a6eeb1123a43e006517524a78d7042fc0 Mon Sep 17 00:00:00 2001 From: luhahn Date: Thu, 10 Dec 2020 17:16:13 +0800 Subject: [PATCH] Fix admin user creation for gitea 1.13.0, chart version 2.1.0 (#80) Fix admin user creation for gitea 1.13.0 Add load balancer hint for ssh in README Merge branch 'master' into fix-admin-user-creation Co-authored-by: Lucas Hahn Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/80 Reviewed-by: Andrew Thornton Reviewed-by: Lunny Xiao Co-Authored-By: luhahn Co-Committed-By: luhahn --- Chart.yaml | 2 +- README.md | 12 ++++++++++++ templates/gitea/init.yaml | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index d25cf7b..9c29900 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: gitea description: Gitea Helm chart for Kubernetes type: application -version: 2.1.0 +version: 2.1.1 appVersion: 1.13.0 icon: https://docs.gitea.io/images/gitea.png diff --git a/README.md b/README.md index 9fe0815..6947d48 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,18 @@ By default port 3000 is used for web traffic and 22 for ssh. Those can be change This helmchart automatically configures the clone urls to use the correct ports. You can change these ports by hand using the gitea.config dict. However you should know what you're doing. +### SSH and Ingress + +If you're using ingress and wan't to use SSH, keep in mind, that ingress is not able to forward SSH Ports. +You will need a LoadBalancer like metallb and a setting in your ssh service annotations. + +```yaml +service: + ssh: + annotations: + metallb.universe.tf/allow-shared-ip: test +``` + ### Cache This helm chart can use a built in cache. The default is memcached from bitnami. diff --git a/templates/gitea/init.yaml b/templates/gitea/init.yaml index 7d8e12f..a3ec9f4 100644 --- a/templates/gitea/init.yaml +++ b/templates/gitea/init.yaml @@ -18,7 +18,7 @@ stringData: set -x; \ gitea migrate; \ {{- if and .Values.gitea.admin.username .Values.gitea.admin.password }} - gitea admin create-user --username {{ .Values.gitea.admin.username }} --password '{{ .Values.gitea.admin.password }}' --email {{ .Values.gitea.admin.email }} --admin \ + gitea admin create-user --username {{ .Values.gitea.admin.username }} --password '{{ .Values.gitea.admin.password }}' --email {{ .Values.gitea.admin.email }} --admin --must-change-password=false \ || \ gitea admin change-password --username {{ .Values.gitea.admin.username }} --password '{{ .Values.gitea.admin.password }}'; \ {{- end }}