Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
9d9ea09afb
|
|||
| 0bdf8c789d | |||
| ca3a022261 | |||
| 01aec86f96 | |||
| 037a0cd190 | |||
| 3049bcaa95 | |||
| a36ec46c62 | |||
| e8c151b59c | |||
| 735f5e24d5 |
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
check-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
container: commitlint/commitlint:21.0.2
|
||||
container: commitlint/commitlint:21.2.0
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- name: check PR title
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 18.7.6
|
||||
version: 18.7.11
|
||||
- name: postgresql-ha
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 16.3.2
|
||||
@@ -10,6 +10,6 @@ dependencies:
|
||||
version: 3.0.24
|
||||
- name: valkey
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 6.1.9
|
||||
digest: sha256:b64f4fef8450b7d16263cdca87558e45cea2560990ad4ab3dd319e05709d12df
|
||||
generated: "2026-06-20T00:01:35.832598614Z"
|
||||
version: 6.1.14
|
||||
digest: sha256:7eeedc92664d1fccceafeadd55d10090e67bc11e1961cbd8f62a92f51c84586a
|
||||
generated: "2026-07-04T00:01:06.153107369Z"
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@ description: (Unofficial) Gitea Helm chart for Kubernetes
|
||||
type: application
|
||||
version: 0.0.0
|
||||
# renovate datasource=github-releases depName=go-gitea/gitea extractVersion=^v(?<version>.*)$
|
||||
appVersion: 1.26.3
|
||||
appVersion: 1.26.4
|
||||
icon: https://gitea.com/assets/img/logo.svg
|
||||
|
||||
annotations:
|
||||
@@ -32,7 +32,7 @@ dependencies:
|
||||
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql
|
||||
- name: postgresql
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 18.7.6
|
||||
version: 18.7.11
|
||||
condition: postgresql.enabled
|
||||
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql-ha/Chart.yaml
|
||||
- name: postgresql-ha
|
||||
@@ -47,5 +47,5 @@ dependencies:
|
||||
# https://github.com/bitnami/charts/blob/main/bitnami/valkey/Chart.yaml
|
||||
- name: valkey
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 6.1.9
|
||||
version: 6.1.14
|
||||
condition: valkey.enabled
|
||||
|
||||
@@ -948,7 +948,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
||||
| `global.imagePullSecrets` | global image pull secrets override; can be extended by `imagePullSecrets` | `[]` |
|
||||
| `global.storageClass` | global storage class override | `""` |
|
||||
| `global.hostAliases` | global hostAliases which will be added to the pod's hosts files | `[]` |
|
||||
| `namespace` | An explicit namespace to deploy Gitea into. Defaults to the release namespace if not specified | `""` |
|
||||
| `namespace` | An explicit namespace to deploy gitea into. Defaults to the release namespace if not specified | `""` |
|
||||
| `replicaCount` | number of replicas for the deployment | `1` |
|
||||
|
||||
### strategy
|
||||
@@ -1026,6 +1026,19 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
||||
| `ingress.hosts[0].paths[0].path` | Default Ingress path | `/` |
|
||||
| `ingress.tls` | Ingress tls settings | `[]` |
|
||||
|
||||
### Gateway
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------- | ---------------------------------------------------------------- | --------------------- |
|
||||
| `gateway.httpRoute.enabled` | Enable HTTPRoute | `false` |
|
||||
| `gateway.httpRoute.annotations` | HTTPRoute annotations | `{}` |
|
||||
| `gateway.httpRoute.hostnames` | HTTPRoute hostnames | `["git.example.com"]` |
|
||||
| `gateway.httpRoute.parentRefs[0].name` | HTTPRoute Gateway name | `traefik` |
|
||||
| `gateway.httpRoute.parentRefs[0].sectionName` | HTTPRoute Gateway section name | `https` |
|
||||
| `gateway.httpRoute.parentRefs[0].kind` | HTTPRoute Gateway kind | `Gateway` |
|
||||
| `gateway.httpRoute.pathType` | HTTPRoute path match type (PathPrefix, Exact, RegularExpression) | `PathPrefix` |
|
||||
| `gateway.httpRoute.paths[0].path` | Default HTTPRoute path | `/` |
|
||||
|
||||
### deployment
|
||||
|
||||
| Name | Description | Value |
|
||||
@@ -1070,8 +1083,8 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
||||
| `persistence.subPath` | Subdirectory of the volume to mount at | `nil` |
|
||||
| `persistence.volumeName` | Name of persistent volume in PVC | `""` |
|
||||
| `extraContainers` | Additional sidecar containers to run in the pod | `[]` |
|
||||
| `preExtraInitContainers` | Additional init containers to run in the pod before Gitea runs it owns init containers. | `[]` |
|
||||
| `postExtraInitContainers` | Additional init containers to run in the pod after Gitea runs it owns init containers. | `[]` |
|
||||
| `preExtraInitContainers` | Additional init containers to run in the pod before gitea runs it owns init containers. | `[]` |
|
||||
| `postExtraInitContainers` | Additional init containers to run in the pod after gitea runs it owns init containers. | `[]` |
|
||||
| `extraVolumes` | Additional volumes to mount to the Gitea deployment | `[]` |
|
||||
| `extraContainerVolumeMounts` | Mounts that are only mapped into the Gitea runtime/main container, to e.g. override custom templates. | `[]` |
|
||||
| `extraInitVolumeMounts` | Mounts that are only mapped into the init-containers. Can be used for additional preconfiguration. | `[]` |
|
||||
|
||||
Generated
+9
-9
@@ -469,9 +469,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/linkify-it": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.1.tgz",
|
||||
"integrity": "sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==",
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz",
|
||||
"integrity": "sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -599,9 +599,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/markdownlint-cli/node_modules/brace-expansion": {
|
||||
"version": "5.0.6",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
|
||||
"integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
|
||||
"version": "5.0.7",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
|
||||
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1251,9 +1251,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
|
||||
"integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
|
||||
"integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
||||
@@ -471,3 +471,12 @@ https
|
||||
{{- define "gitea.metrics-secret-name" -}}
|
||||
{{ default (printf "%s-metrics-secret" (include "gitea.fullname" .)) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Validate that Ingress and Gateway HTTPRoute are not enabled at the same time
|
||||
*/}}
|
||||
{{- define "gitea.validate-ingress-gateway-conflict" -}}
|
||||
{{- if and ((.Values.ingress).enabled) (((.Values.gateway).httpRoute).enabled) -}}
|
||||
{{- fail "You cannot enable both Ingress and HTTPRoute at the same time" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,79 @@
|
||||
{{- include "gitea.validate-ingress-gateway-conflict" . }}
|
||||
{{- if .Values.gateway.httpRoute.enabled -}}
|
||||
{{- $fullName := include "gitea.fullname" . -}}
|
||||
{{- $httpPort := .Values.service.http.port -}}
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
namespace: {{ .Values.namespace | default .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "gitea.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.gateway.httpRoute.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
hostnames:
|
||||
{{- range .Values.gateway.httpRoute.hostnames }}
|
||||
- {{ tpl . $ | quote }}
|
||||
{{- end }}
|
||||
parentRefs:
|
||||
{{- range .Values.gateway.httpRoute.parentRefs }}
|
||||
- name: {{ .name | quote }}
|
||||
{{- if .namespace }}
|
||||
namespace: {{ .namespace | quote }}
|
||||
{{- end }}
|
||||
{{- if .kind }}
|
||||
kind: {{ .kind | quote }}
|
||||
{{- end }}
|
||||
{{- if .group }}
|
||||
group: {{ .group | quote }}
|
||||
{{- end }}
|
||||
{{- if .sectionName }}
|
||||
sectionName: {{ .sectionName | quote }}
|
||||
{{- end }}
|
||||
{{- if .port }}
|
||||
port: {{ .port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.gateway.httpRoute.paths }}
|
||||
{{- range .Values.gateway.httpRoute.paths }}
|
||||
{{- if kindIs "string" . }}
|
||||
- matches:
|
||||
- path:
|
||||
type: {{ default "PathPrefix" $.Values.gateway.httpRoute.pathType }}
|
||||
value: {{ . }}
|
||||
backendRefs:
|
||||
- group: ""
|
||||
kind: Service
|
||||
name: {{ $fullName }}-http
|
||||
namespace: {{ $.Values.namespace | default $.Release.Namespace }}
|
||||
port: {{ $httpPort }}
|
||||
{{- else }}
|
||||
- matches:
|
||||
- path:
|
||||
type: {{ .pathType | default "PathPrefix" }}
|
||||
value: {{ .path | default "/" }}
|
||||
backendRefs:
|
||||
- group: ""
|
||||
kind: Service
|
||||
name: {{ $fullName }}-http
|
||||
namespace: {{ $.Values.namespace | default $.Release.Namespace }}
|
||||
port: {{ $httpPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: "/"
|
||||
backendRefs:
|
||||
- group: ""
|
||||
kind: Service
|
||||
name: {{ $fullName }}-http
|
||||
namespace: {{ .Values.namespace | default .Release.Namespace }}
|
||||
port: {{ $httpPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- include "gitea.validate-ingress-gateway-conflict" . }}
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "gitea.fullname" . -}}
|
||||
{{- $httpPort := .Values.service.http.port -}}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
suite: Test httproute.yaml
|
||||
templates:
|
||||
- templates/gitea/httproute.yaml
|
||||
tests:
|
||||
- it: should enable httproute when gateway.httpRoute.enabled is true
|
||||
set:
|
||||
gateway.httpRoute.enabled: true
|
||||
gateway.httpRoute.annotations:
|
||||
some-annotation: some-value
|
||||
gateway.httpRoute.hostnames:
|
||||
- example.com
|
||||
gateway.httpRoute.parentRefs:
|
||||
- name: traefik
|
||||
sectionName: https
|
||||
kind: Gateway
|
||||
gateway.httpRoute.paths:
|
||||
- path: /
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: HTTPRoute
|
||||
- isAPIVersion:
|
||||
of: gateway.networking.k8s.io/v1
|
||||
- equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-gitea
|
||||
- equal:
|
||||
path: metadata.annotations["some-annotation"]
|
||||
value: some-value
|
||||
- equal:
|
||||
path: spec.hostnames[0]
|
||||
value: "example.com"
|
||||
- equal:
|
||||
path: spec.parentRefs[0].name
|
||||
value: "traefik"
|
||||
- equal:
|
||||
path: spec.parentRefs[0].kind
|
||||
value: "Gateway"
|
||||
- equal:
|
||||
path: spec.parentRefs[0].sectionName
|
||||
value: "https"
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.type
|
||||
value: "PathPrefix"
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.value
|
||||
value: "/"
|
||||
- equal:
|
||||
path: spec.rules[0].backendRefs[0].name
|
||||
value: "RELEASE-NAME-gitea-http"
|
||||
- equal:
|
||||
path: spec.rules[0].backendRefs[0].port
|
||||
value: 3000
|
||||
|
||||
- it: should not create httproute when gateway.httpRoute.enabled is false
|
||||
set:
|
||||
gateway.httpRoute.enabled: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
|
||||
- it: hostname using TPL
|
||||
set:
|
||||
global.giteaHostName: "gitea.example.com"
|
||||
gateway.httpRoute.enabled: true
|
||||
gateway.httpRoute.hostnames:
|
||||
- "{{ .Values.global.giteaHostName }}"
|
||||
asserts:
|
||||
- isKind:
|
||||
of: HTTPRoute
|
||||
- equal:
|
||||
path: spec.hostnames[0]
|
||||
value: "gitea.example.com"
|
||||
@@ -0,0 +1,19 @@
|
||||
suite: Test httproute with implicit path defaults
|
||||
templates:
|
||||
- templates/gitea/httproute.yaml
|
||||
tests:
|
||||
- it: should use default path and pathType when no paths are specified
|
||||
set:
|
||||
gateway.httpRoute.enabled: true
|
||||
gateway.httpRoute.paths: []
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: HTTPRoute
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.type
|
||||
value: "PathPrefix"
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.value
|
||||
value: "/"
|
||||
@@ -0,0 +1,56 @@
|
||||
suite: Test httproute with structured paths
|
||||
templates:
|
||||
- templates/gitea/httproute.yaml
|
||||
tests:
|
||||
- it: should work with a plain string path
|
||||
set:
|
||||
gateway.httpRoute.enabled: true
|
||||
gateway.httpRoute.paths:
|
||||
- /
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: HTTPRoute
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.type
|
||||
value: "PathPrefix"
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.value
|
||||
value: "/"
|
||||
|
||||
- it: should work with structured path definitions and per-path pathType
|
||||
set:
|
||||
gateway.httpRoute.enabled: true
|
||||
gateway.httpRoute.paths:
|
||||
- path: /
|
||||
- path: /foo
|
||||
pathType: Exact
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: HTTPRoute
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.type
|
||||
value: "PathPrefix"
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.value
|
||||
value: "/"
|
||||
- equal:
|
||||
path: spec.rules[1].matches[0].path.type
|
||||
value: "Exact"
|
||||
- equal:
|
||||
path: spec.rules[1].matches[0].path.value
|
||||
value: "/foo"
|
||||
|
||||
- it: should allow overriding the default pathType
|
||||
set:
|
||||
gateway.httpRoute.enabled: true
|
||||
gateway.httpRoute.pathType: Exact
|
||||
gateway.httpRoute.paths:
|
||||
- /
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.type
|
||||
value: "Exact"
|
||||
@@ -12,3 +12,14 @@ tests:
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: valkey and valkey-cluster cannot be enabled at the same time. Please only choose one.
|
||||
|
||||
- it: fails when trying to enable ingress and gateway httpRoute at the same time
|
||||
set:
|
||||
ingress:
|
||||
enabled: true
|
||||
gateway:
|
||||
httpRoute:
|
||||
enabled: true
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: You cannot enable both Ingress and HTTPRoute at the same time
|
||||
|
||||
+24
@@ -177,6 +177,30 @@ ingress:
|
||||
# hosts:
|
||||
# - git.example.com
|
||||
|
||||
## @section Gateway
|
||||
## @param gateway.httpRoute.enabled Enable HTTPRoute
|
||||
## @param gateway.httpRoute.annotations HTTPRoute annotations
|
||||
## @param gateway.httpRoute.hostnames HTTPRoute hostnames
|
||||
## @param gateway.httpRoute.parentRefs[0].name HTTPRoute Gateway name
|
||||
## @param gateway.httpRoute.parentRefs[0].sectionName HTTPRoute Gateway section name
|
||||
## @param gateway.httpRoute.parentRefs[0].kind HTTPRoute Gateway kind
|
||||
## @param gateway.httpRoute.pathType HTTPRoute path match type (PathPrefix, Exact, RegularExpression)
|
||||
## @param gateway.httpRoute.paths[0].path Default HTTPRoute path
|
||||
gateway:
|
||||
httpRoute:
|
||||
enabled: false
|
||||
annotations: {}
|
||||
hostnames:
|
||||
- git.example.com
|
||||
parentRefs:
|
||||
- name: traefik
|
||||
sectionName: https
|
||||
kind: Gateway
|
||||
pathType: PathPrefix
|
||||
paths:
|
||||
- path: /
|
||||
|
||||
|
||||
## @section deployment
|
||||
#
|
||||
## @param resources Kubernetes resources
|
||||
|
||||
Reference in New Issue
Block a user