Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
4ad5cf1d19 | |||
7f828e87f6 |
31
README.md
31
README.md
@ -95,6 +95,16 @@ ROOT_URL = http://git.example.com
|
|||||||
SSH_DOMAIN = git.example.com
|
SSH_DOMAIN = git.example.com
|
||||||
SSH_LISTEN_PORT = 22
|
SSH_LISTEN_PORT = 22
|
||||||
SSH_PORT = 22
|
SSH_PORT = 22
|
||||||
|
ENABLE_PPROF = false
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Metrics defaults
|
||||||
|
|
||||||
|
The Prometheus `/metrics` endpoint is disabled by default.
|
||||||
|
|
||||||
|
```ini
|
||||||
|
[metrics]
|
||||||
|
ENABLED = false
|
||||||
```
|
```
|
||||||
|
|
||||||
### External Database
|
### External Database
|
||||||
@ -257,6 +267,7 @@ camelCase:
|
|||||||
bindDn: CN=ldap read,OU=Spezial,DC=example,DC=com
|
bindDn: CN=ldap read,OU=Spezial,DC=example,DC=com
|
||||||
bindPassword: JustAnotherBindPw
|
bindPassword: JustAnotherBindPw
|
||||||
usernameAttribute: CN
|
usernameAttribute: CN
|
||||||
|
sshPublicKeyAttribute: sshPublicKey
|
||||||
```
|
```
|
||||||
|
|
||||||
kebab-case:
|
kebab-case:
|
||||||
@ -278,6 +289,24 @@ kebab-case:
|
|||||||
username-attribute: CN
|
username-attribute: CN
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Metrics and profiling
|
||||||
|
|
||||||
|
A Prometheus `/metrics` endpoint on the `HTTP_PORT` and `pprof` profiling endpoints on port 6060 can be enabled under `gitea`. Beware that the metrics endpoint is exposed via the ingress, manage access using ingress annotations for example.
|
||||||
|
|
||||||
|
To deploy the `ServiceMonitor`, you first need to ensure that you have deployed `prometheus-operator` and its CRDs: https://github.com/prometheus-operator/prometheus-operator#customresourcedefinitions.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
gitea:
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
config:
|
||||||
|
server:
|
||||||
|
PPROF_ENABLED: true
|
||||||
|
```
|
||||||
|
|
||||||
### Pod Annotations
|
### Pod Annotations
|
||||||
|
|
||||||
Annotations can be added to the Gitea pod.
|
Annotations can be added to the Gitea pod.
|
||||||
@ -316,6 +345,8 @@ Annotations can be added to the Gitea pod.
|
|||||||
|persistence.size| Size for persistence to store repo information | 10Gi |
|
|persistence.size| Size for persistence to store repo information | 10Gi |
|
||||||
|persistence.accessModes|AccessMode for persistence||
|
|persistence.accessModes|AccessMode for persistence||
|
||||||
|persistence.storageClass|Storage class for repository persistence||
|
|persistence.storageClass|Storage class for repository persistence||
|
||||||
|
|persistence.labels|Labels for the persistence volume claim to be created|{}|
|
||||||
|
|persistence.annotations|Annotations for the persistence volume claim to be created|{}|
|
||||||
|
|
||||||
### Ingress
|
### Ingress
|
||||||
|
|
||||||
|
@ -15,6 +15,10 @@ stringData:
|
|||||||
{{- $_ := set .Values.gitea.config "server" dict -}}
|
{{- $_ := set .Values.gitea.config "server" dict -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if not (hasKey .Values.gitea.config "metrics") -}}
|
||||||
|
{{- $_ := set .Values.gitea.config "metrics" dict -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- if not (hasKey .Values.gitea.config "database") -}}
|
{{- if not (hasKey .Values.gitea.config "database") -}}
|
||||||
{{- $_ := set .Values.gitea.config "database" dict -}}
|
{{- $_ := set .Values.gitea.config "database" dict -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@ -65,6 +69,14 @@ stringData:
|
|||||||
{{- if not (hasKey .Values.gitea.config.server "APP_DATA_PATH") -}}
|
{{- if not (hasKey .Values.gitea.config.server "APP_DATA_PATH") -}}
|
||||||
{{- $_ := set .Values.gitea.config.server "APP_DATA_PATH" "/data" -}}
|
{{- $_ := set .Values.gitea.config.server "APP_DATA_PATH" "/data" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- if not (hasKey .Values.gitea.config.server "PPROF_ENABLED") -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.server "PPROF_ENABLED" false -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- /* metrics default settings */ -}}
|
||||||
|
{{- if not (hasKey .Values.gitea.config.metrics "ENABLED") -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.metrics "ENABLED" .Values.gitea.metrics.enabled -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* database default settings */ -}}
|
{{- /* database default settings */ -}}
|
||||||
{{- if .Values.gitea.database.builtIn.postgresql.enabled -}}
|
{{- if .Values.gitea.database.builtIn.postgresql.enabled -}}
|
||||||
|
14
templates/gitea/servicemonitor.yaml
Normal file
14
templates/gitea/servicemonitor.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{{- if .Values.gitea.metrics.serviceMonitor.enabled -}}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ include "gitea.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "gitea.selectorLabels" . | nindent 6 }}
|
||||||
|
endpoints:
|
||||||
|
- port: http
|
||||||
|
{{- end -}}
|
@ -66,6 +66,10 @@ spec:
|
|||||||
containerPort: {{ .Values.gitea.config.server.SSH_LISTEN_PORT }}
|
containerPort: {{ .Values.gitea.config.server.SSH_LISTEN_PORT }}
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ .Values.gitea.config.server.HTTP_PORT }}
|
containerPort: {{ .Values.gitea.config.server.HTTP_PORT }}
|
||||||
|
{{- if .Values.gitea.config.server.PPROF_ENABLED }}
|
||||||
|
- name: profiler
|
||||||
|
containerPort: 6060
|
||||||
|
{{- end }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: http
|
port: http
|
||||||
@ -123,6 +127,18 @@ spec:
|
|||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
- metadata:
|
- metadata:
|
||||||
name: data
|
name: data
|
||||||
|
{{- with .Values.persistence.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- range $key, $value := . }}
|
||||||
|
{{ $key }}: {{ $value }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.persistence.labels }}
|
||||||
|
labels:
|
||||||
|
{{- range $key, $value := . }}
|
||||||
|
{{ $key }}: {{ $value }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
{{- range .Values.persistence.accessModes }}
|
{{- range .Values.persistence.accessModes }}
|
||||||
|
@ -73,6 +73,8 @@ persistence:
|
|||||||
size: 10Gi
|
size: 10Gi
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
|
labels: {}
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
# additional volumes to add to the Gitea statefulset.
|
# additional volumes to add to the Gitea statefulset.
|
||||||
extraVolumes:
|
extraVolumes:
|
||||||
@ -105,6 +107,11 @@ gitea:
|
|||||||
password: r8sA8CPHD9!bt6d
|
password: r8sA8CPHD9!bt6d
|
||||||
email: "gitea@local.domain"
|
email: "gitea@local.domain"
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
enabled: false
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
ldap:
|
ldap:
|
||||||
enabled: false
|
enabled: false
|
||||||
#name:
|
#name:
|
||||||
@ -118,6 +125,7 @@ gitea:
|
|||||||
#bindDn:
|
#bindDn:
|
||||||
#bindPassword:
|
#bindPassword:
|
||||||
#usernameAttribute:
|
#usernameAttribute:
|
||||||
|
#sshPublicKeyAttribute:
|
||||||
|
|
||||||
config: {}
|
config: {}
|
||||||
# APP_NAME: "Gitea: Git with a cup of tea"
|
# APP_NAME: "Gitea: Git with a cup of tea"
|
||||||
|
Reference in New Issue
Block a user