feat!: set proper namespaces and allow override (#850)
Reviewed-on: https://code.forgejo.org/forgejo-helm/forgejo-helm/pulls/850
This commit is contained in:
commit
2fdbef4fce
15 changed files with 48 additions and 22 deletions
|
@ -1,4 +1,7 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
|
- name: common
|
||||||
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
|
version: 2.22.0
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 15.5.32
|
version: 15.5.32
|
||||||
|
@ -11,5 +14,5 @@ dependencies:
|
||||||
- name: redis
|
- name: redis
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 20.1.4
|
version: 20.1.4
|
||||||
digest: sha256:090e07d4ccdf92398cf6226fbee81ebe89da949a3f404e8a5dd8441aaced8b0a
|
digest: sha256:9d2b884e017d1969d05f51d27350e3aa6a8a76a8a9fd06ee76e8e0dd0065a916
|
||||||
generated: "2024-09-23T00:01:43.477068293Z"
|
generated: "2024-09-25T08:49:24.0952098+02:00"
|
||||||
|
|
|
@ -26,6 +26,12 @@ maintainers:
|
||||||
# https://hub.docker.com/u/bitnamicharts
|
# https://hub.docker.com/u/bitnamicharts
|
||||||
# https://blog.bitnami.com/2023/01/bitnami-helm-charts-available-as-oci.html
|
# https://blog.bitnami.com/2023/01/bitnami-helm-charts-available-as-oci.html
|
||||||
dependencies:
|
dependencies:
|
||||||
|
# https://github.com/bitnami/charts/blob/main/bitnami/common/Chart.yaml
|
||||||
|
- name: common
|
||||||
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
|
tags:
|
||||||
|
- bitnami-common
|
||||||
|
version: 2.22.0
|
||||||
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql/Chart.yaml
|
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql/Chart.yaml
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
|
|
32
README.md
32
README.md
|
@ -862,6 +862,7 @@ To comply with the Forgejo helm chart definition of the digest parameter, a "cus
|
||||||
| `global.imagePullSecrets` | global image pull secrets override; can be extended by `imagePullSecrets` | `[]` |
|
| `global.imagePullSecrets` | global image pull secrets override; can be extended by `imagePullSecrets` | `[]` |
|
||||||
| `global.storageClass` | global storage class override | `""` |
|
| `global.storageClass` | global storage class override | `""` |
|
||||||
| `global.hostAliases` | global hostAliases which will be added to the pod's hosts files | `[]` |
|
| `global.hostAliases` | global hostAliases which will be added to the pod's hosts files | `[]` |
|
||||||
|
| `namespaceOverride` | String to fully override common.names.namespace | `""` |
|
||||||
| `replicaCount` | number of replicas for the deployment | `1` |
|
| `replicaCount` | number of replicas for the deployment | `1` |
|
||||||
|
|
||||||
### strategy
|
### strategy
|
||||||
|
@ -1008,21 +1009,22 @@ To comply with the Forgejo helm chart definition of the digest parameter, a "cus
|
||||||
|
|
||||||
### Gitea
|
### Gitea
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------- |
|
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------- |
|
||||||
| `gitea.admin.username` | Username for the Forgejo admin user | `gitea_admin` |
|
| `gitea.admin.username` | Username for the Forgejo admin user | `gitea_admin` |
|
||||||
| `gitea.admin.existingSecret` | Use an existing secret to store admin user credentials | `nil` |
|
| `gitea.admin.existingSecret` | Use an existing secret to store admin user credentials | `nil` |
|
||||||
| `gitea.admin.password` | Password for the Forgejo admin user | `r8sA8CPHD9!bt6d` |
|
| `gitea.admin.password` | Password for the Forgejo admin user | `r8sA8CPHD9!bt6d` |
|
||||||
| `gitea.admin.email` | Email for the Forgejo admin user | `gitea@local.domain` |
|
| `gitea.admin.email` | Email for the Forgejo 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.admin.passwordMode` | Mode for how to set/update the admin user password. Options are: initialOnlyNoReset, initialOnlyRequireReset, and keepUpdated | `keepUpdated` |
|
||||||
| `gitea.metrics.enabled` | Enable Forgejo metrics | `false` |
|
| `gitea.metrics.enabled` | Enable Forgejo metrics | `false` |
|
||||||
| `gitea.metrics.serviceMonitor.enabled` | Enable Forgejo metrics service monitor | `false` |
|
| `gitea.metrics.serviceMonitor.enabled` | Enable Forgejo metrics service monitor | `false` |
|
||||||
| `gitea.ldap` | LDAP configuration | `[]` |
|
| `gitea.metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `""` |
|
||||||
| `gitea.oauth` | OAuth configuration | `[]` |
|
| `gitea.ldap` | LDAP configuration | `[]` |
|
||||||
| `gitea.additionalConfigSources` | Additional configuration from secret or configmap | `[]` |
|
| `gitea.oauth` | OAuth configuration | `[]` |
|
||||||
| `gitea.additionalConfigFromEnvs` | Additional configuration sources from environment variables | `[]` |
|
| `gitea.additionalConfigSources` | Additional configuration from secret or configmap | `[]` |
|
||||||
| `gitea.podAnnotations` | Annotations for the Forgejo pod | `{}` |
|
| `gitea.additionalConfigFromEnvs` | Additional configuration sources from environment variables | `[]` |
|
||||||
| `gitea.ssh.logLevel` | Configure OpenSSH's log level. Only available for root-based Forgejo image. | `INFO` |
|
| `gitea.podAnnotations` | Annotations for the Forgejo pod | `{}` |
|
||||||
|
| `gitea.ssh.logLevel` | Configure OpenSSH's log level. Only available for root-based Forgejo image. | `INFO` |
|
||||||
|
|
||||||
### `app.ini` overrides
|
### `app.ini` overrides
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "gitea.fullname" . }}-inline-config
|
name: {{ include "gitea.fullname" . }}-inline-config
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
type: Opaque
|
type: Opaque
|
||||||
|
|
|
@ -2,6 +2,7 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "gitea.fullname" . }}
|
name: {{ include "gitea.fullname" . }}
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- if .Values.deployment.annotations }}
|
{{- if .Values.deployment.annotations }}
|
||||||
{{- toYaml .Values.deployment.annotations | nindent 4 }}
|
{{- toYaml .Values.deployment.annotations | nindent 4 }}
|
||||||
|
@ -402,4 +403,4 @@ spec:
|
||||||
{{- else if not .Values.persistence.enabled }}
|
{{- else if not .Values.persistence.enabled }}
|
||||||
- name: data
|
- name: data
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -7,6 +7,7 @@ apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "gitea.gpg-key-secret-name" . }}
|
name: {{ include "gitea.gpg-key-secret-name" . }}
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
type: Opaque
|
type: Opaque
|
||||||
|
|
|
@ -2,6 +2,7 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "gitea.fullname" . }}-http
|
name: {{ include "gitea.fullname" . }}-http
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
{{- if .Values.service.http.labels }}
|
{{- if .Values.service.http.labels }}
|
||||||
|
|
|
@ -13,6 +13,7 @@ apiVersion: {{ $apiVersion }}
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ $fullName }}
|
name: {{ $fullName }}
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
annotations:
|
annotations:
|
||||||
|
|
|
@ -2,6 +2,7 @@ apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "gitea.fullname" . }}-init
|
name: {{ include "gitea.fullname" . }}-init
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
type: Opaque
|
type: Opaque
|
||||||
|
|
|
@ -7,6 +7,7 @@ apiVersion: policy/v1beta1
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "gitea.fullname" . }}
|
name: {{ include "gitea.fullname" . }}
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
@ -14,4 +15,4 @@ spec:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "gitea.selectorLabels" . | nindent 6 }}
|
{{- include "gitea.selectorLabels" . | nindent 6 }}
|
||||||
{{- toYaml .Values.podDisruptionBudget | nindent 2 }}
|
{{- toYaml .Values.podDisruptionBudget | nindent 2 }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -3,7 +3,7 @@ kind: PersistentVolumeClaim
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Values.persistence.claimName }}
|
name: {{ .Values.persistence.claimName }}
|
||||||
namespace: {{ $.Release.Namespace }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
annotations:
|
annotations:
|
||||||
{{ .Values.persistence.annotations | toYaml | indent 4}}
|
{{ .Values.persistence.annotations | toYaml | indent 4}}
|
||||||
{{- if .Values.persistence.labels }}
|
{{- if .Values.persistence.labels }}
|
||||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "gitea.serviceAccountName" . }}
|
name: {{ include "gitea.serviceAccountName" . }}
|
||||||
namespace: {{ .Release.Namespace | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
{{- with .Values.serviceAccount.labels }}
|
{{- with .Values.serviceAccount.labels }}
|
||||||
|
|
|
@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1
|
||||||
kind: ServiceMonitor
|
kind: ServiceMonitor
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "gitea.fullname" . }}
|
name: {{ include "gitea.fullname" . }}
|
||||||
|
namespace: {{ default (include "common.names.namespace" .) .Values.gitea.metrics.serviceMonitor.namespace | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
{{- if .Values.gitea.metrics.serviceMonitor.additionalLabels }}
|
{{- if .Values.gitea.metrics.serviceMonitor.additionalLabels }}
|
||||||
|
@ -14,4 +15,4 @@ spec:
|
||||||
{{- include "gitea.selectorLabels" . | nindent 6 }}
|
{{- include "gitea.selectorLabels" . | nindent 6 }}
|
||||||
endpoints:
|
endpoints:
|
||||||
- port: http
|
- port: http
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -2,6 +2,7 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "gitea.fullname" . }}-ssh
|
name: {{ include "gitea.fullname" . }}-ssh
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
{{- if .Values.service.ssh.labels }}
|
{{- if .Values.service.ssh.labels }}
|
||||||
|
|
|
@ -20,6 +20,10 @@ global:
|
||||||
# hostnames:
|
# hostnames:
|
||||||
# - example.com
|
# - example.com
|
||||||
|
|
||||||
|
## @param namespaceOverride String to fully override common.names.namespace
|
||||||
|
##
|
||||||
|
namespaceOverride: ''
|
||||||
|
|
||||||
## @param replicaCount number of replicas for the deployment
|
## @param replicaCount number of replicas for the deployment
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
|
@ -357,10 +361,12 @@ gitea:
|
||||||
|
|
||||||
## @param gitea.metrics.enabled Enable Forgejo metrics
|
## @param gitea.metrics.enabled Enable Forgejo metrics
|
||||||
## @param gitea.metrics.serviceMonitor.enabled Enable Forgejo metrics service monitor
|
## @param gitea.metrics.serviceMonitor.enabled Enable Forgejo metrics service monitor
|
||||||
|
## @param gitea.metrics.serviceMonitor.namespace Namespace in which Prometheus is running
|
||||||
metrics:
|
metrics:
|
||||||
enabled: false
|
enabled: false
|
||||||
serviceMonitor:
|
serviceMonitor:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
namespace: ''
|
||||||
# additionalLabels:
|
# additionalLabels:
|
||||||
# prometheus-release: prom1
|
# prometheus-release: prom1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue