Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
6b8b64f607 | |||
6fa80222a6 | |||
031b58c90e | |||
178bc0ab79 | |||
441f0748e9 | |||
5ab596937a | |||
5b5ea7173a |
@ -9,7 +9,7 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- name: lint
|
- name: lint
|
||||||
pull: always
|
pull: always
|
||||||
image: alpine:3.12
|
image: alpine:3.13
|
||||||
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 lint
|
- helm lint
|
||||||
@ -42,21 +42,22 @@ trigger:
|
|||||||
steps:
|
steps:
|
||||||
- name: generate-chart
|
- name: generate-chart
|
||||||
pull: always
|
pull: always
|
||||||
image: alpine:3.12
|
image: alpine:3.13
|
||||||
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
|
||||||
|
- apk add --no-cache curl
|
||||||
- helm dependency update
|
- helm dependency update
|
||||||
- helm package --version "${DRONE_TAG##v}" ./
|
- 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
|
- 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
|
- helm repo index gitea/ --url https://dl.gitea.io/charts --merge gitea/index.yaml
|
||||||
|
|
||||||
- name: upload-chart
|
- name: upload-chart
|
||||||
pull: always
|
pull: always
|
||||||
image: plugins/s3:latest
|
image: plugins/s3:latest
|
||||||
settings:
|
settings:
|
||||||
bucket: releases
|
bucket: gitea-artifacts
|
||||||
endpoint: https://storage.gitea.io
|
endpoint: https://storage.gitea.io
|
||||||
path_style: true
|
path_style: true
|
||||||
access_key:
|
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
|
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.
|
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.
|
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.
|
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 | {} |
|
| extraVolumeMounts | Additional volumes mounts for the Gitea containers | {} |
|
||||||
| initPreScript | Bash script copied verbatim to start of init container | |
|
| initPreScript | Bash script copied verbatim to start of init container | |
|
||||||
| securityContext | Run as a specific securityContext | {} |
|
| securityContext | Run as a specific securityContext | {} |
|
||||||
|
| schedulerName | Use an alternate scheduler, e.g. "stork" | |
|
||||||
|
|
||||||
### Image
|
### Image
|
||||||
|
|
||||||
| 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.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.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 |
|
|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.type| Kubernetes service type for web traffic | ClusterIP |
|
||||||
|service.http.port| Port for web traffic | 3000 |
|
|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.type| Kubernetes service type for ssh traffic | ClusterIP |
|
||||||
|service.ssh.port| Port for ssh traffic | 22 |
|
|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.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.externalIPs| ssh service external IP addresses | 3000 |
|
||||||
|service.ssh.annotations| Additional ssh annotations for the ssh service ||
|
|service.ssh.loadBalancerSourceRanges| Source range filter for ssh loadbalancer | [] |
|
||||||
|
|service.ssh.annotations| ssh service annotations | |
|
||||||
|
|
||||||
### Gitea Configuration
|
### Gitea Configuration
|
||||||
|
|
||||||
|
@ -11,6 +11,19 @@ spec:
|
|||||||
{{- if and .Values.service.http.loadBalancerIP (eq .Values.service.http.type "LoadBalancer") }}
|
{{- if and .Values.service.http.loadBalancerIP (eq .Values.service.http.type "LoadBalancer") }}
|
||||||
loadBalancerIP: {{ .Values.service.http.loadBalancerIP }}
|
loadBalancerIP: {{ .Values.service.http.loadBalancerIP }}
|
||||||
{{- end }}
|
{{- 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") }}
|
{{- if and .Values.service.http.clusterIP (eq .Values.service.http.type "ClusterIP") }}
|
||||||
clusterIP: {{ .Values.service.http.clusterIP }}
|
clusterIP: {{ .Values.service.http.clusterIP }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -5,8 +5,8 @@ metadata:
|
|||||||
name: {{ include "gitea.fullname" . }}
|
name: {{ include "gitea.fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
{{- if .Values.gitea.metrics.serviceMonitor.prometheusSelector }}
|
{{- if .Values.gitea.metrics.serviceMonitor.additionalLabels }}
|
||||||
prometheus: {{ .Values.gitea.metrics.serviceMonitor.prometheusSelector }}
|
{{- toYaml .Values.gitea.metrics.serviceMonitor.additionalLabels | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
|
@ -28,6 +28,9 @@ spec:
|
|||||||
{{- toYaml .Values.statefulset.labels | nindent 8 }}
|
{{- toYaml .Values.statefulset.labels | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
|
{{- if .Values.schedulerName }}
|
||||||
|
schedulerName: "{{ .Values.schedulerName }}"
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with .Values.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
@ -77,6 +80,8 @@ spec:
|
|||||||
value: /data
|
value: /data
|
||||||
- name: GITEA_TEMP
|
- name: GITEA_TEMP
|
||||||
value: /tmp/gitea
|
value: /tmp/gitea
|
||||||
|
- name: TMPDIR
|
||||||
|
value: /tmp/gitea
|
||||||
{{- if .Values.statefulset.env }}
|
{{- if .Values.statefulset.env }}
|
||||||
{{- toYaml .Values.statefulset.env | nindent 12 }}
|
{{- toYaml .Values.statefulset.env | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@ -134,7 +139,7 @@ spec:
|
|||||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: temp
|
- name: temp
|
||||||
mountPath: /tmp/gitea
|
mountPath: /tmp
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- if .Values.extraVolumeMounts }}
|
||||||
|
15
values.yaml
15
values.yaml
@ -8,12 +8,13 @@ clusterDomain: cluster.local
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
repository: gitea/gitea
|
repository: gitea/gitea
|
||||||
tag: 1.14.1
|
tag: 1.14.2
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
rootless: false # only possible when running 1.14 or later
|
rootless: false # only possible when running 1.14 or later
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
# only usable with rootless image due to image design
|
||||||
securityContext: {}
|
securityContext: {}
|
||||||
# allowPrivilegeEscalation: false
|
# allowPrivilegeEscalation: false
|
||||||
# capabilities:
|
# capabilities:
|
||||||
@ -32,6 +33,9 @@ service:
|
|||||||
clusterIP: None
|
clusterIP: None
|
||||||
#loadBalancerIP:
|
#loadBalancerIP:
|
||||||
#nodePort:
|
#nodePort:
|
||||||
|
#externalTrafficPolicy:
|
||||||
|
#externalIPs:
|
||||||
|
loadBalancerSourceRanges: []
|
||||||
annotations:
|
annotations:
|
||||||
ssh:
|
ssh:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
@ -68,6 +72,11 @@ resources: {}
|
|||||||
# cpu: 100m
|
# cpu: 100m
|
||||||
# memory: 128Mi
|
# memory: 128Mi
|
||||||
|
|
||||||
|
## Use an alternate scheduler, e.g. "stork".
|
||||||
|
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||||
|
##
|
||||||
|
# schedulerName:
|
||||||
|
|
||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
|
|
||||||
tolerations: []
|
tolerations: []
|
||||||
@ -89,6 +98,7 @@ persistence:
|
|||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
labels: {}
|
labels: {}
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
# storageClass:
|
||||||
|
|
||||||
# additional volumes to add to the Gitea statefulset.
|
# additional volumes to add to the Gitea statefulset.
|
||||||
extraVolumes:
|
extraVolumes:
|
||||||
@ -125,7 +135,8 @@ gitea:
|
|||||||
enabled: false
|
enabled: false
|
||||||
serviceMonitor:
|
serviceMonitor:
|
||||||
enabled: false
|
enabled: false
|
||||||
# prometheusSelector: default
|
# additionalLabels:
|
||||||
|
# prometheus-release: prom1
|
||||||
|
|
||||||
ldap:
|
ldap:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
Reference in New Issue
Block a user