You've already forked helm-gitea
Compare commits
2 Commits
v10.4.1
...
c039673e5a
Author | SHA1 | Date | |
---|---|---|---|
c039673e5a | |||
e636984db1 |
42
README.md
42
README.md
@ -498,6 +498,9 @@ redis-cluster:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
⚠️ The redis charts [do not work well with special characters in the password](https://gitea.com/gitea/helm-chart/issues/690).
|
||||
Consider omitting such or open an issue in the Bitnami repo and let us know once this got fixed.
|
||||
|
||||
### Persistence
|
||||
|
||||
Gitea will be deployed as a deployment.
|
||||
@ -1001,23 +1004,28 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
||||
|
||||
### Gitea
|
||||
|
||||
| Name | Description | Value |
|
||||
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------- |
|
||||
| `gitea.admin.username` | Username for the Gitea admin user | `gitea_admin` |
|
||||
| `gitea.admin.existingSecret` | Use an existing secret to store admin user credentials | `nil` |
|
||||
| `gitea.admin.password` | Password for the Gitea admin user | `r8sA8CPHD9!bt6d` |
|
||||
| `gitea.admin.email` | Email for the Gitea admin user | `gitea@local.domain` |
|
||||
| `gitea.admin.passwordMode` | Mode for how to set/update the admin user password. Options are: initialOnlyNoReset, initialOnlyRequireReset, and keepUpdated | `keepUpdated` |
|
||||
| `gitea.metrics.enabled` | Enable Gitea metrics | `false` |
|
||||
| `gitea.metrics.serviceMonitor.enabled` | Enable Gitea metrics service monitor | `false` |
|
||||
| `gitea.ldap` | LDAP configuration | `[]` |
|
||||
| `gitea.oauth` | OAuth configuration | `[]` |
|
||||
| `gitea.config.server.SSH_PORT` | SSH port for rootlful Gitea image | `22` |
|
||||
| `gitea.config.server.SSH_LISTEN_PORT` | SSH port for rootless Gitea image | `2222` |
|
||||
| `gitea.additionalConfigSources` | Additional configuration from secret or configmap | `[]` |
|
||||
| `gitea.additionalConfigFromEnvs` | Additional configuration sources from environment variables | `[]` |
|
||||
| `gitea.podAnnotations` | Annotations for the Gitea pod | `{}` |
|
||||
| `gitea.ssh.logLevel` | Configure OpenSSH's log level. Only available for root-based Gitea image. | `INFO` |
|
||||
| Name | Description | Value |
|
||||
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
|
||||
| `gitea.admin.username` | Username for the Gitea admin user | `gitea_admin` |
|
||||
| `gitea.admin.existingSecret` | Use an existing secret to store admin user credentials | `nil` |
|
||||
| `gitea.admin.password` | Password for the Gitea admin user | `r8sA8CPHD9!bt6d` |
|
||||
| `gitea.admin.email` | Email for the Gitea admin user | `gitea@local.domain` |
|
||||
| `gitea.admin.passwordMode` | Mode for how to set/update the admin user password. Options are: initialOnlyNoReset, initialOnlyRequireReset, and keepUpdated | `keepUpdated` |
|
||||
| `gitea.metrics.enabled` | Enable Gitea metrics | `false` |
|
||||
| `gitea.metrics.serviceMonitor.enabled` | Enable Gitea metrics service monitor. Requires, that `gitea.metrics.enabled` is also set to true, to enable metrics generally. | `false` |
|
||||
| `gitea.metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. If not specified Prometheus' global scrape interval is used. | `""` |
|
||||
| `gitea.metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping. | `[]` |
|
||||
| `gitea.metrics.serviceMonitor.scheme` | HTTP scheme to use for scraping. For example `http` or `https`. Default is http. | `""` |
|
||||
| `gitea.metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended. If not specified, global Prometheus scrape timeout is used. | `""` |
|
||||
| `gitea.metrics.serviceMonitor.tlsConfig` | TLS configuration to use when scraping the metric endpoint by Prometheus. | `{}` |
|
||||
| `gitea.ldap` | LDAP configuration | `[]` |
|
||||
| `gitea.oauth` | OAuth configuration | `[]` |
|
||||
| `gitea.config.server.SSH_PORT` | SSH port for rootlful Gitea image | `22` |
|
||||
| `gitea.config.server.SSH_LISTEN_PORT` | SSH port for rootless Gitea image | `2222` |
|
||||
| `gitea.additionalConfigSources` | Additional configuration from secret or configmap | `[]` |
|
||||
| `gitea.additionalConfigFromEnvs` | Additional configuration sources from environment variables | `[]` |
|
||||
| `gitea.podAnnotations` | Annotations for the Gitea pod | `{}` |
|
||||
| `gitea.ssh.logLevel` | Configure OpenSSH's log level. Only available for root-based Gitea image. | `INFO` |
|
||||
|
||||
### LivenessProbe
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{- if .Values.gitea.metrics.serviceMonitor.enabled -}}
|
||||
{{- if and .Values.gitea.metrics.enabled .Values.gitea.metrics.serviceMonitor.enabled -}}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
@ -14,4 +14,21 @@ spec:
|
||||
{{- include "gitea.selectorLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- port: http
|
||||
{{- if .Values.gitea.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.gitea.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- with .Values.gitea.metrics.serviceMonitor.relabelings }}
|
||||
relabelings:
|
||||
{{- . | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.gitea.metrics.serviceMonitor.scheme }}
|
||||
scheme: {{ .Values.gitea.metrics.serviceMonitor.scheme }}
|
||||
{{- end }}
|
||||
{{- if .Values.gitea.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.gitea.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
{{- with .Values.gitea.metrics.serviceMonitor.tlsConfig }}
|
||||
tlsConfig:
|
||||
{{- . | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
89
unittests/servicemonitor/basic.yaml
Normal file
89
unittests/servicemonitor/basic.yaml
Normal file
@ -0,0 +1,89 @@
|
||||
suite: ServiceMonitor template (basic)
|
||||
release:
|
||||
name: gitea-unittests
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/gitea/servicemonitor.yaml
|
||||
tests:
|
||||
- it: skips rendering by default
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
- it: renders default ServiceMonitor object with gitea.metrics.enabled=true
|
||||
set:
|
||||
gitea.metrics.enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
- it: renders default ServiceMonitor object with gitea.metrics.serviceMonitor.enabled=true
|
||||
set:
|
||||
gitea.metrics.serviceMonitor.enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
- it: renders defaults
|
||||
set:
|
||||
gitea.metrics.enabled: true
|
||||
gitea.metrics.serviceMonitor.enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- containsDocument:
|
||||
kind: ServiceMonitor
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
name: gitea-unittests
|
||||
- notExists:
|
||||
path: metadata.annotations
|
||||
- notExists:
|
||||
path: spec.endpoints[0].interval
|
||||
- equal:
|
||||
path: spec.endpoints[0].port
|
||||
value: http
|
||||
- notExists:
|
||||
path: spec.endpoints[0].scheme
|
||||
- notExists:
|
||||
path: spec.endpoints[0].scrapeTimeout
|
||||
- notExists:
|
||||
path: spec.endpoints[0].tlsConfig
|
||||
- it: renders custom scrape interval
|
||||
set:
|
||||
gitea.metrics.enabled: true
|
||||
gitea.metrics.serviceMonitor.enabled: true
|
||||
gitea.metrics.serviceMonitor.interval: 30s
|
||||
gitea.metrics.serviceMonitor.scrapeTimeout: 5s
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.endpoints[0].interval
|
||||
value: 30s
|
||||
- equal:
|
||||
path: spec.endpoints[0].scrapeTimeout
|
||||
value: 5s
|
||||
- it: renders custom tls config
|
||||
set:
|
||||
gitea.metrics.enabled: true
|
||||
gitea.metrics.serviceMonitor.enabled: true
|
||||
gitea.metrics.serviceMonitor.scheme: https
|
||||
gitea.metrics.serviceMonitor.tlsConfig.caFile: /etc/prometheus/tls/ca.crt
|
||||
gitea.metrics.serviceMonitor.tlsConfig.certFile: /etc/prometheus/tls/tls.crt
|
||||
gitea.metrics.serviceMonitor.tlsConfig.keyFile: /etc/prometheus/tls/tls.key
|
||||
gitea.metrics.serviceMonitor.tlsConfig.insecureSkipVerify: false
|
||||
gitea.metrics.serviceMonitor.tlsConfig.serverName: gitea-unittest
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.endpoints[0].scheme
|
||||
value: https
|
||||
- equal:
|
||||
path: spec.endpoints[0].tlsConfig.caFile
|
||||
value: /etc/prometheus/tls/ca.crt
|
||||
- equal:
|
||||
path: spec.endpoints[0].tlsConfig.certFile
|
||||
value: /etc/prometheus/tls/tls.crt
|
||||
- equal:
|
||||
path: spec.endpoints[0].tlsConfig.keyFile
|
||||
value: /etc/prometheus/tls/tls.key
|
||||
- equal:
|
||||
path: spec.endpoints[0].tlsConfig.insecureSkipVerify
|
||||
value: false
|
||||
- equal:
|
||||
path: spec.endpoints[0].tlsConfig.serverName
|
||||
value: gitea-unittest
|
16
values.yaml
16
values.yaml
@ -356,13 +356,23 @@ gitea:
|
||||
passwordMode: keepUpdated
|
||||
|
||||
## @param gitea.metrics.enabled Enable Gitea metrics
|
||||
## @param gitea.metrics.serviceMonitor.enabled Enable Gitea metrics service monitor
|
||||
## @param gitea.metrics.serviceMonitor.enabled Enable Gitea metrics service monitor. Requires, that `gitea.metrics.enabled` is also set to true, to enable metrics generally.
|
||||
## @param gitea.metrics.serviceMonitor.interval Interval at which metrics should be scraped. If not specified Prometheus' global scrape interval is used.
|
||||
## @param gitea.metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping.
|
||||
## @param gitea.metrics.serviceMonitor.scheme HTTP scheme to use for scraping. For example `http` or `https`. Default is http.
|
||||
## @param gitea.metrics.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended. If not specified, global Prometheus scrape timeout is used.
|
||||
## @param gitea.metrics.serviceMonitor.tlsConfig TLS configuration to use when scraping the metric endpoint by Prometheus.
|
||||
metrics:
|
||||
enabled: false
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
# additionalLabels:
|
||||
# prometheus-release: prom1
|
||||
interval: ""
|
||||
relabelings: []
|
||||
scheme: ""
|
||||
scrapeTimeout: ""
|
||||
tlsConfig: {}
|
||||
|
||||
## @param gitea.ldap LDAP configuration
|
||||
ldap:
|
||||
@ -488,6 +498,8 @@ gitea:
|
||||
|
||||
## @section redis-cluster
|
||||
## @param redis-cluster.enabled Enable redis cluster
|
||||
# ⚠️ The redis charts do not work well with special characters in the password (<https://gitea.com/gitea/helm-chart/issues/690>).
|
||||
# Consider omitting such or open an issue in the Bitnami repo and let us know once this got fixed.
|
||||
## @param redis-cluster.usePassword Whether to use password authentication
|
||||
## @param redis-cluster.cluster.nodes Number of redis cluster master nodes
|
||||
## @param redis-cluster.cluster.replicas Number of redis cluster master node replicas
|
||||
@ -504,6 +516,8 @@ redis-cluster:
|
||||
## @section redis
|
||||
## @param redis.enabled Enable redis standalone or replicated
|
||||
## @param redis.architecture Whether to use standalone or replication
|
||||
# ⚠️ The redis charts do not work well with special characters in the password (<https://gitea.com/gitea/helm-chart/issues/690>).
|
||||
# Consider omitting such or open an issue in the Bitnami repo and let us know once this got fixed.
|
||||
## @param redis.global.redis.password Required password
|
||||
## @param redis.master.count Number of Redis master instances to deploy
|
||||
## @descriptionStart
|
||||
|
Reference in New Issue
Block a user