Compare commits

..

6 Commits

Author SHA1 Message Date
0c8f226f1f Add ldap checksum (#101)
Fixed an error in ldap port setting.

Added ldap checksum to deployment so chart will actually update on ldap changes.

Fixes: #99

Co-authored-by: Lucas Hahn <lucas.hahn@novum-rgi.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/101
Reviewed-by: lafriks <lafriks@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: luhahn <luhahn@noreply.gitea.io>
Co-committed-by: luhahn <luhahn@noreply.gitea.io>
2021-01-14 15:13:49 +08:00
daba777e24 Update 'README.md' (#102)
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/102
Reviewed-by: luhahn <luhahn@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: fabioluciano <fabioluciano@noreply.gitea.io>
Co-committed-by: fabioluciano <fabioluciano@noreply.gitea.io>
2021-01-13 23:49:58 +08:00
54cc78b43a 1.13.1 (#97)
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/97
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-committed-by: techknowlogick <techknowlogick@gitea.io>
2021-01-02 13:07:11 +08:00
94ee162ad5 Fix kebab-case bug in values (#89)
Kebab case will fail because of the current ldap default values in values.yml as stated in #88

Co-authored-by: Lucas Hahn <lucas.hahn@novum-rgi.de>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/89
Reviewed-by: lafriks <lafriks@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: luhahn <luhahn@noreply.gitea.io>
Co-committed-by: luhahn <luhahn@noreply.gitea.io>
2020-12-28 03:26:51 +08:00
9b2e76c9cf Move chart version to drone build using tag (#93)
Move chart version to drone build using tag

Merge branch 'master' into feat/chart_version

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/93
Reviewed-by: luhahn <luhahn@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Co-Authored-By: lafriks <lafriks@noreply.gitea.io>
Co-Committed-By: lafriks <lafriks@noreply.gitea.io>
2020-12-21 10:05:42 +08:00
2c066d7c9e Use image tag instead of image version in values (#91)
Use image tag instead of image version in values

Change to tenary function instead of if

Update description and add link to tag list

Fixup readme

Co-authored-by: Lauris BH <lauris@nix.lv>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/91
Reviewed-by: luhahn <luhahn@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Co-Authored-By: lafriks <lafriks@noreply.gitea.io>
Co-Committed-By: lafriks <lafriks@noreply.gitea.io>
2020-12-21 06:53:45 +08:00
6 changed files with 34 additions and 32 deletions

View File

@ -41,19 +41,19 @@ trigger:
steps: steps:
- name: generate-chart - name: generate-chart
pull: default pull: always
image: alpine:3.12 image: alpine:3.12
commands: commands:
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm - apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
- helm dependency update - helm dependency update
- helm package ./ - helm package --version "${DRONE_TAG##v}" ./
- mkdir gitea - mkdir gitea
- mv gitea*.tgz gitea/ - mv gitea*.tgz gitea/
- wget -O gitea/index.yaml https://dl.gitea.io/charts/index.yaml - wget -O gitea/index.yaml https://dl.gitea.io/charts/index.yaml
- helm repo index gitea/ --url https://dl.gitea.io/charts --merge gitea/index.yaml - helm repo index gitea/ --url https://dl.gitea.io/charts --merge gitea/index.yaml
- name: upload-chart - name: upload-chart
pull: default pull: always
image: plugins/s3:latest image: plugins/s3:latest
settings: settings:
bucket: releases bucket: releases

View File

@ -2,8 +2,8 @@ apiVersion: v2
name: gitea name: gitea
description: Gitea Helm chart for Kubernetes description: Gitea Helm chart for Kubernetes
type: application type: application
version: 2.1.3 version: 0.0.0
appVersion: 1.13.0 appVersion: 1.13.1
icon: https://docs.gitea.io/images/gitea.png icon: https://docs.gitea.io/images/gitea.png
keywords: keywords:

View File

@ -4,9 +4,9 @@
## Introduction ## Introduction
This helm chart has taken some inspiration from https://github.com/jfelten/gitea-helm-chart This helm chart has taken some inspiration from <https://github.com/jfelten/gitea-helm-chart>
But takes a completly different approach in providing database and cache with dependencies. But takes a completly different approach in providing database and cache with dependencies.
Also this chart provides ldap and admin user configuration with values as well as it is deployed as statefulset to retain stored repositories. Also this chart provides LDAP and admin user configuration with values as well as it is deployed as statefulset to retain stored repositories.
## Dependencies ## Dependencies
@ -21,7 +21,7 @@ Dependencies:
## Installing ## Installing
``` ```sh
helm repo add gitea-charts https://dl.gitea.io/charts/ helm repo add gitea-charts https://dl.gitea.io/charts/
helm install gitea gitea-charts/gitea helm install gitea gitea-charts/gitea
``` ```
@ -60,7 +60,7 @@ INSTALL_LOCK is always set to true, since we want to configure gitea with this h
If a builtIn database is enabled the database configuration is set automatically. For example postgresql builtIn which will appear in the app.ini as: If a builtIn database is enabled the database configuration is set automatically. For example postgresql builtIn which will appear in the app.ini as:
``` ```ini
[database] [database]
DB_TYPE = postgres DB_TYPE = postgres
HOST = RELEASE-NAME-postgresql.default.svc.cluster.local:5432 HOST = RELEASE-NAME-postgresql.default.svc.cluster.local:5432
@ -73,7 +73,7 @@ USER = gitea
Memcached is handled the exakt same way as database builtIn. Once memcached builtIn is enabled, this chart will generate the following part in the app.ini: Memcached is handled the exakt same way as database builtIn. Once memcached builtIn is enabled, this chart will generate the following part in the app.ini:
``` ```ini
[cache] [cache]
ADAPTER = memcache ADAPTER = memcache
ENABLED = true ENABLED = true
@ -85,7 +85,7 @@ HOST = RELEASE-NAME-memcached.default.svc.cluster.local:11211
The server defaults are a bit more complex. The server defaults are a bit more complex.
If ingress is enabled, the ROOT_URL, DOMAIN and SSH_DOMAIN will be set accordingly. HTTP_PORT always defaults to 3000 as well as SSH_PORT to 22. If ingress is enabled, the ROOT_URL, DOMAIN and SSH_DOMAIN will be set accordingly. HTTP_PORT always defaults to 3000 as well as SSH_PORT to 22.
``` ```ini
[server] [server]
APP_DATA_PATH = /data APP_DATA_PATH = /data
DOMAIN = git.example.com DOMAIN = git.example.com
@ -224,6 +224,7 @@ You can interact with the postgres settings as displayed in the following exampl
This chart enables you to create a default admin user. It is also possible to update the password for this user by upgrading or redeloying the chart. This chart enables you to create a default admin user. It is also possible to update the password for this user by upgrading or redeloying the chart.
It is not possible to delete an admin user after it has been created. This has to be done in the ui. It is not possible to delete an admin user after it has been created. This has to be done in the ui.
You cannot use `admin` as username.
```yaml ```yaml
gitea: gitea:
@ -235,8 +236,8 @@ It is not possible to delete an admin user after it has been created. This has t
### LDAP Settings ### LDAP Settings
Like the admin user the ldap settings can be updated but also disabled or deleted. Like the admin user the LDAP settings can be updated but also disabled or deleted.
All ldap values from https://docs.gitea.io/en-us/command-line/#admin are available. All LDAP values from <https://docs.gitea.io/en-us/command-line/#admin> are available.
You can either use them in camel case or kebab case. You can either use them in camel case or kebab case.
camelCase: camelCase:
@ -300,7 +301,7 @@ Annotations can be added to the Gitea pod.
| Parameter | Description | Default | | Parameter | Description | Default |
|---------------------|-----------------------------------|------------------------------| |---------------------|-----------------------------------|------------------------------|
|image.repository| Image to start for this pod | gitea/gitea | |image.repository| Image to start for this pod | gitea/gitea |
|image.version| Image Version | 1.13.0 | |image.tag| [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated) | 1.13.1 |
|image.pullPolicy| Image pull policy | Always | |image.pullPolicy| Image pull policy | Always |
### Persistence ### Persistence

View File

@ -99,7 +99,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- range $key, $val := .Values.gitea.ldap -}} {{- range $key, $val := .Values.gitea.ldap -}}
{{- if ne $key "enabled" -}} {{- if ne $key "enabled" -}}
{{- if eq $key "port" -}} {{- if eq $key "port" -}}
{{- printf "--%s %s " ($key | kebabcase) $val -}} {{- printf "--%s %d " ($key | kebabcase) ($val | int) -}}
{{- else -}} {{- else -}}
{{- printf "--%s %s " ($key | kebabcase) ($val | quote) -}} {{- printf "--%s %s " ($key | kebabcase) ($val | quote) -}}
{{- end -}} {{- end -}}

View File

@ -14,6 +14,7 @@ spec:
metadata: metadata:
annotations: annotations:
checksum/config: {{ include (print $.Template.BasePath "/gitea/config.yaml") . | sha256sum }} checksum/config: {{ include (print $.Template.BasePath "/gitea/config.yaml") . | sha256sum }}
checksum/ldap: {{ include "gitea.ldap_settings" . | sha256sum }}
{{- with .Values.gitea.podAnnotations }} {{- with .Values.gitea.podAnnotations }}
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
@ -28,7 +29,7 @@ spec:
fsGroup: 1000 fsGroup: 1000
initContainers: initContainers:
- name: init - name: init
image: "{{ .Values.image.repository }}:{{ .Values.image.version }}" image: "{{ .Values.image.repository }}:{{ ternary .Values.image.version .Values.image.tag (hasKey .Values.image "version") }}"
command: ["/usr/sbin/init_gitea.sh"] command: ["/usr/sbin/init_gitea.sh"]
volumeMounts: volumeMounts:
- name: init - name: init
@ -40,7 +41,7 @@ spec:
terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }} terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.version }}" image: "{{ .Values.image.repository }}:{{ ternary .Values.image.version .Values.image.tag (hasKey .Values.image "version") }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
env: env:
# SSH Port values have to be set here as well for openssh configuration # SSH Port values have to be set here as well for openssh configuration

View File

@ -8,7 +8,7 @@ clusterDomain: cluster.local
image: image:
repository: gitea/gitea repository: gitea/gitea
version: 1.13.0 tag: 1.13.1
pullPolicy: Always pullPolicy: Always
imagePullSecrets: [] imagePullSecrets: []
@ -82,17 +82,17 @@ gitea:
ldap: ldap:
enabled: false enabled: false
name: "" #name:
securityProtocol: "" #securityProtocol:
host: "" #host:
port: "" #port:
userSearchBase: "" #userSearchBase:
userFilter: "" #userFilter:
adminFilter: "" #adminFilter:
emailAttribute: "" #emailAttribute:
bindDn: "" #bindDn:
bindPassword: "" #bindPassword:
usernameAttribute: "" #usernameAttribute:
config: {} config: {}
# APP_NAME: "Gitea: Git with a cup of tea" # APP_NAME: "Gitea: Git with a cup of tea"