Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
6b8b64f607 | |||
6fa80222a6 | |||
031b58c90e | |||
178bc0ab79 | |||
441f0748e9 | |||
5ab596937a | |||
5b5ea7173a |
@ -9,7 +9,7 @@ platform:
|
||||
steps:
|
||||
- name: lint
|
||||
pull: always
|
||||
image: alpine:3.12
|
||||
image: alpine:3.13
|
||||
commands:
|
||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
||||
- helm lint
|
||||
@ -42,21 +42,22 @@ trigger:
|
||||
steps:
|
||||
- name: generate-chart
|
||||
pull: always
|
||||
image: alpine:3.12
|
||||
image: alpine:3.13
|
||||
commands:
|
||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
||||
- apk add --no-cache curl
|
||||
- helm dependency update
|
||||
- helm package --version "${DRONE_TAG##v}" ./
|
||||
- mkdir gitea
|
||||
- mv gitea*.tgz gitea/
|
||||
- wget -O gitea/index.yaml https://dl.gitea.io/charts/index.yaml
|
||||
- curl -L -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
|
||||
|
||||
- name: upload-chart
|
||||
pull: always
|
||||
image: plugins/s3:latest
|
||||
settings:
|
||||
bucket: releases
|
||||
bucket: gitea-artifacts
|
||||
endpoint: https://storage.gitea.io
|
||||
path_style: true
|
||||
access_key:
|
||||
|
29
README.md
29
README.md
@ -205,6 +205,17 @@ If the built in cache should not be used simply configure the cache in gitea.con
|
||||
Gitea will be deployed as a statefulset. By simply enabling the persistence and setting the storage class according to your cluster
|
||||
everything else will be taken care of. The following example will create a PVC as a part of the statefulset. This PVC will not be deleted even if you uninstall the chart.
|
||||
|
||||
Please note, that an empty storageClass in the persistence will result in kubernetes using your default storage class.
|
||||
|
||||
If you want to use your own storageClass define it as followed:
|
||||
|
||||
```yaml
|
||||
persistence:
|
||||
enabled: true
|
||||
storageClass: myOwnStorageClass
|
||||
|
||||
```
|
||||
|
||||
When using Postgresql as dependency, this will also be deployed as a statefulset by default.
|
||||
|
||||
If you want to manage your own PVC you can simply pass the PVC name to the chart.
|
||||
@ -376,13 +387,14 @@ Annotations can be added to the Gitea pod.
|
||||
| extraVolumeMounts | Additional volumes mounts for the Gitea containers | {} |
|
||||
| initPreScript | Bash script copied verbatim to start of init container | |
|
||||
| securityContext | Run as a specific securityContext | {} |
|
||||
| schedulerName | Use an alternate scheduler, e.g. "stork" | |
|
||||
|
||||
### Image
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|---------------------|-----------------------------------|------------------------------|
|
||||
|image.repository| Image to start for this pod | gitea/gitea |
|
||||
|image.tag| [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated) | 1.14.1 |
|
||||
|image.tag| [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated) | 1.14.2 |
|
||||
|image.pullPolicy| Image pull policy | Always |
|
||||
|image.rootless | Wether or not to pull the rootless version of gitea, only works on gitea 1.14.x or higher | false |
|
||||
|
||||
@ -413,11 +425,22 @@ Annotations can be added to the Gitea pod.
|
||||
|---------------------|-----------------------------------|------------------------------|
|
||||
|service.http.type| Kubernetes service type for web traffic | ClusterIP |
|
||||
|service.http.port| Port for web traffic | 3000 |
|
||||
|service.http.clusterIP| ClusterIP setting for http autosetup for statefulset is None | None |
|
||||
|service.http.loadBalancerIP| LoadBalancer Ip setting | |
|
||||
|service.http.nodePort| NodePort for http service | |
|
||||
|service.http.externalTrafficPolicy| If `service.http.type` is `NodePort` or `LoadBalancer`, set this to `Local` to enable source IP preservation | |
|
||||
|service.http.externalIPs| http service external IP addresses | 3000 |
|
||||
|service.http.loadBalancerSourceRanges| Source range filter for http loadbalancer | [] |
|
||||
|service.http.annotations| http service annotations | |
|
||||
|
||||
|service.ssh.type| Kubernetes service type for ssh traffic | ClusterIP |
|
||||
|service.ssh.port| Port for ssh traffic | 22 |
|
||||
|service.ssh.loadBalancerIP| LoadBalancer Ip setting | |
|
||||
|service.ssh.nodePort| NodePort for ssh service | |
|
||||
|service.ssh.externalTrafficPolicy| If `service.ssh.type` is `NodePort` or `LoadBalancer`, set this to `Local` to enable source IP preservation | |
|
||||
|service.ssh.externalIPs| SSH service external IP addresses |[]|
|
||||
|service.ssh.annotations| Additional ssh annotations for the ssh service ||
|
||||
|service.ssh.externalIPs| ssh service external IP addresses | 3000 |
|
||||
|service.ssh.loadBalancerSourceRanges| Source range filter for ssh loadbalancer | [] |
|
||||
|service.ssh.annotations| ssh service annotations | |
|
||||
|
||||
### Gitea Configuration
|
||||
|
||||
|
@ -11,6 +11,19 @@ spec:
|
||||
{{- if and .Values.service.http.loadBalancerIP (eq .Values.service.http.type "LoadBalancer") }}
|
||||
loadBalancerIP: {{ .Values.service.http.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.http.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{- range .Values.service.http.loadBalancerSourceRanges }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.http.externalIPs }}
|
||||
externalIPs:
|
||||
{{- toYaml .Values.service.http.externalIPs | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.http.externalTrafficPolicy }}
|
||||
externalTrafficPolicy: {{ .Values.service.http.externalTrafficPolicy }}
|
||||
{{- end }}
|
||||
{{- if and .Values.service.http.clusterIP (eq .Values.service.http.type "ClusterIP") }}
|
||||
clusterIP: {{ .Values.service.http.clusterIP }}
|
||||
{{- end }}
|
||||
|
@ -5,8 +5,8 @@ metadata:
|
||||
name: {{ include "gitea.fullname" . }}
|
||||
labels:
|
||||
{{- include "gitea.labels" . | nindent 4 }}
|
||||
{{- if .Values.gitea.metrics.serviceMonitor.prometheusSelector }}
|
||||
prometheus: {{ .Values.gitea.metrics.serviceMonitor.prometheusSelector }}
|
||||
{{- if .Values.gitea.metrics.serviceMonitor.additionalLabels }}
|
||||
{{- toYaml .Values.gitea.metrics.serviceMonitor.additionalLabels | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
|
@ -28,6 +28,9 @@ spec:
|
||||
{{- toYaml .Values.statefulset.labels | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: "{{ .Values.schedulerName }}"
|
||||
{{- end }}
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
@ -77,6 +80,8 @@ spec:
|
||||
value: /data
|
||||
- name: GITEA_TEMP
|
||||
value: /tmp/gitea
|
||||
- name: TMPDIR
|
||||
value: /tmp/gitea
|
||||
{{- if .Values.statefulset.env }}
|
||||
{{- toYaml .Values.statefulset.env | nindent 12 }}
|
||||
{{- end }}
|
||||
@ -134,7 +139,7 @@ spec:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: temp
|
||||
mountPath: /tmp/gitea
|
||||
mountPath: /tmp
|
||||
- name: data
|
||||
mountPath: /data
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
|
15
values.yaml
15
values.yaml
@ -8,12 +8,13 @@ clusterDomain: cluster.local
|
||||
|
||||
image:
|
||||
repository: gitea/gitea
|
||||
tag: 1.14.1
|
||||
tag: 1.14.2
|
||||
pullPolicy: Always
|
||||
rootless: false # only possible when running 1.14 or later
|
||||
|
||||
imagePullSecrets: []
|
||||
|
||||
# only usable with rootless image due to image design
|
||||
securityContext: {}
|
||||
# allowPrivilegeEscalation: false
|
||||
# capabilities:
|
||||
@ -32,6 +33,9 @@ service:
|
||||
clusterIP: None
|
||||
#loadBalancerIP:
|
||||
#nodePort:
|
||||
#externalTrafficPolicy:
|
||||
#externalIPs:
|
||||
loadBalancerSourceRanges: []
|
||||
annotations:
|
||||
ssh:
|
||||
type: ClusterIP
|
||||
@ -68,6 +72,11 @@ resources: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Use an alternate scheduler, e.g. "stork".
|
||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||
##
|
||||
# schedulerName:
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
@ -89,6 +98,7 @@ persistence:
|
||||
- ReadWriteOnce
|
||||
labels: {}
|
||||
annotations: {}
|
||||
# storageClass:
|
||||
|
||||
# additional volumes to add to the Gitea statefulset.
|
||||
extraVolumes:
|
||||
@ -125,7 +135,8 @@ gitea:
|
||||
enabled: false
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
# prometheusSelector: default
|
||||
# additionalLabels:
|
||||
# prometheus-release: prom1
|
||||
|
||||
ldap:
|
||||
enabled: false
|
||||
|
Reference in New Issue
Block a user