Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
829bca241d | |||
6be4f8bb97 | |||
aeea86b26a | |||
4ed7818ec2 | |||
b84a431854 | |||
a1af5eab4e | |||
f5ad4eb33d | |||
5dfaca13f2 | |||
70e5da077a | |||
d7cba5443f | |||
e9d401a9ee | |||
7b7789e65d | |||
8a191f0eca |
@ -7,7 +7,7 @@ on:
|
||||
|
||||
env:
|
||||
# renovate: datasource=docker depName=alpine/helm
|
||||
HELM_VERSION: "3.13.2"
|
||||
HELM_VERSION: "3.13.3"
|
||||
|
||||
jobs:
|
||||
generate-chart-publish:
|
||||
|
@ -11,12 +11,12 @@ on:
|
||||
|
||||
env:
|
||||
# renovate: datasource=github-releases depName=helm-unittest/helm-unittest
|
||||
HELM_UNITTEST_VERSION: "v0.3.6"
|
||||
HELM_UNITTEST_VERSION: "v0.4.1"
|
||||
|
||||
jobs:
|
||||
check-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
container: alpine/helm:3.13.2
|
||||
container: alpine/helm:3.13.3
|
||||
steps:
|
||||
- name: install tools
|
||||
run: |
|
||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"yaml.schemas": {
|
||||
"https://raw.githubusercontent.com/helm-unittest/helm-unittest/v0.3.6/schema/helm-testsuite.json": [
|
||||
"https://raw.githubusercontent.com/helm-unittest/helm-unittest/v0.4.1/schema/helm-testsuite.json": [
|
||||
"/unittests/**/*.yaml"
|
||||
]
|
||||
},
|
||||
|
10
Chart.lock
10
Chart.lock
@ -1,12 +1,12 @@
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 13.2.24
|
||||
version: 13.3.1
|
||||
- name: postgresql-ha
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 12.3.3
|
||||
version: 12.7.0
|
||||
- name: redis-cluster
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 9.1.3
|
||||
digest: sha256:c4ae8a7ddfb6670acc7f39d5728a0929f6c7666d32459229b5e4e66b19749677
|
||||
generated: "2023-12-17T00:11:27.841588235Z"
|
||||
version: 9.2.1
|
||||
digest: sha256:cff9fdd51856d8f0526863d5e050427e2ef2acc44b9ea4cabb88d77a5c65ca40
|
||||
generated: "2024-01-20T00:35:15.09075348Z"
|
||||
|
@ -3,7 +3,7 @@ name: gitea
|
||||
description: Gitea Helm chart for Kubernetes
|
||||
type: application
|
||||
version: 0.0.0
|
||||
appVersion: 1.21.3
|
||||
appVersion: 1.21.5
|
||||
icon: https://gitea.com/assets/img/logo.svg
|
||||
|
||||
keywords:
|
||||
@ -31,20 +31,19 @@ maintainers:
|
||||
- name: Patrick Schratz
|
||||
email: patrick.schratz@gmail.com
|
||||
|
||||
# Bitnami charts are served from GitHub CDN - See https://github.com/bitnami/charts/issues/10539 for details
|
||||
dependencies:
|
||||
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql
|
||||
- name: postgresql
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 13.2.24
|
||||
version: 13.3.1
|
||||
condition: postgresql.enabled
|
||||
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql-ha/Chart.yaml
|
||||
- name: postgresql-ha
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 12.3.3
|
||||
version: 12.7.0
|
||||
condition: postgresql-ha.enabled
|
||||
# https://github.com/bitnami/charts/blob/main/bitnami/redis-cluster/Chart.yaml
|
||||
- name: redis-cluster
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 9.1.3
|
||||
version: 9.2.1
|
||||
condition: redis-cluster.enabled
|
||||
|
@ -888,6 +888,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
||||
| `service.http.ipFamilies` | HTTP service dual-stack familiy selection,for dual-stack parameters see official kubernetes [dual-stack concept documentation](https://kubernetes.io/docs/concepts/services-networking/dual-stack/). | `nil` |
|
||||
| `service.http.loadBalancerSourceRanges` | Source range filter for http loadbalancer | `[]` |
|
||||
| `service.http.annotations` | HTTP service annotations | `{}` |
|
||||
| `service.http.labels` | HTTP service additional labels | `{}` |
|
||||
| `service.ssh.type` | Kubernetes service type for ssh traffic | `ClusterIP` |
|
||||
| `service.ssh.port` | Port number for ssh traffic | `22` |
|
||||
| `service.ssh.clusterIP` | ClusterIP setting for ssh autosetup for deployment is None | `None` |
|
||||
@ -900,6 +901,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
||||
| `service.ssh.hostPort` | HostPort for ssh service | `nil` |
|
||||
| `service.ssh.loadBalancerSourceRanges` | Source range filter for ssh loadbalancer | `[]` |
|
||||
| `service.ssh.annotations` | SSH service annotations | `{}` |
|
||||
| `service.ssh.labels` | SSH service additional labels | `{}` |
|
||||
|
||||
### Ingress
|
||||
|
||||
|
@ -94,7 +94,7 @@ imagePullSecrets:
|
||||
Storage Class
|
||||
*/}}
|
||||
{{- define "gitea.persistence.storageClass" -}}
|
||||
{{- $storageClass := .Values.global.storageClass | default .Values.persistence.storageClass }}
|
||||
{{- $storageClass := .Values.persistence.storageClass | default .Values.global.storageClass }}
|
||||
{{- if $storageClass }}
|
||||
storageClassName: {{ $storageClass | quote }}
|
||||
{{- end }}
|
||||
|
@ -4,6 +4,9 @@ metadata:
|
||||
name: {{ include "gitea.fullname" . }}-http
|
||||
labels:
|
||||
{{- include "gitea.labels" . | nindent 4 }}
|
||||
{{- if .Values.service.http.labels }}
|
||||
{{- toYaml .Values.service.http.labels | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- toYaml .Values.service.http.annotations | nindent 4 }}
|
||||
spec:
|
||||
|
@ -6,6 +6,8 @@ metadata:
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
annotations:
|
||||
{{ .Values.persistence.annotations | toYaml | indent 4}}
|
||||
labels:
|
||||
{{ .Values.persistence.labels | toYaml | indent 4}}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- if gt .Values.replicaCount 1.0 }}
|
||||
@ -14,9 +16,7 @@ spec:
|
||||
{{- .Values.persistence.accessModes | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
volumeMode: Filesystem
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
storageClassName: {{ .Values.persistence.storageClass }}
|
||||
{{- end }}
|
||||
{{- include "gitea.persistence.storageClass" . | nindent 2 }}
|
||||
{{- with .Values.persistence.volumeName }}
|
||||
volumeName: {{ . }}
|
||||
{{- end }}
|
||||
|
@ -4,6 +4,9 @@ metadata:
|
||||
name: {{ include "gitea.fullname" . }}-ssh
|
||||
labels:
|
||||
{{- include "gitea.labels" . | nindent 4 }}
|
||||
{{- if .Values.service.ssh.labels }}
|
||||
{{- toYaml .Values.service.ssh.labels | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- toYaml .Values.service.ssh.annotations | nindent 4 }}
|
||||
spec:
|
||||
|
39
unittests/deployment/storage-class-configuration.yaml
Normal file
39
unittests/deployment/storage-class-configuration.yaml
Normal file
@ -0,0 +1,39 @@
|
||||
# File: tests/gitea-storageclass-tests.yaml
|
||||
|
||||
suite: storage class configuration tests
|
||||
|
||||
release:
|
||||
name: gitea-storageclass-tests
|
||||
namespace: testing
|
||||
|
||||
templates:
|
||||
- templates/gitea/pvc.yaml
|
||||
|
||||
tests:
|
||||
- it: should set storageClassName when persistence.storageClass is defined
|
||||
template: templates/gitea/pvc.yaml
|
||||
set:
|
||||
persistence.storageClass: "my-storage-class"
|
||||
asserts:
|
||||
- equal:
|
||||
path: "spec.storageClassName"
|
||||
value: "my-storage-class"
|
||||
|
||||
- it: should set global.storageClass when persistence.storageClass is not defined
|
||||
template: templates/gitea/pvc.yaml
|
||||
set:
|
||||
global.storageClass: "default-storage-class"
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.storageClassName
|
||||
value: "default-storage-class"
|
||||
|
||||
- it: should set storageClassName when persistence.storageClass is defined and global.storageClass is defined
|
||||
template: templates/gitea/pvc.yaml
|
||||
set:
|
||||
global.storageClass: "default-storage-class"
|
||||
persistence.storageClass: "my-storage-class"
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.storageClassName
|
||||
value: "my-storage-class"
|
51
unittests/deployment/svc-configuration.yaml
Normal file
51
unittests/deployment/svc-configuration.yaml
Normal file
@ -0,0 +1,51 @@
|
||||
suite: ssh-svc / http-svc template (Services configuration)
|
||||
release:
|
||||
name: gitea-unittests
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/gitea/ssh-svc.yaml
|
||||
- templates/gitea/http-svc.yaml
|
||||
tests:
|
||||
- it: supports adding custom labels to ssh-svc
|
||||
template: templates/gitea/ssh-svc.yaml
|
||||
set:
|
||||
service:
|
||||
ssh:
|
||||
labels:
|
||||
gitea/testkey: testvalue
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.labels["gitea/testkey"]
|
||||
value: "testvalue"
|
||||
|
||||
- it: keeps existing labels (ssh)
|
||||
template: templates/gitea/ssh-svc.yaml
|
||||
set:
|
||||
service:
|
||||
ssh:
|
||||
labels: {}
|
||||
asserts:
|
||||
- exists:
|
||||
path: metadata.labels["app"]
|
||||
|
||||
- it: supports adding custom labels to http-svc
|
||||
template: templates/gitea/http-svc.yaml
|
||||
set:
|
||||
service:
|
||||
http:
|
||||
labels:
|
||||
gitea/testkey: testvalue
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.labels["gitea/testkey"]
|
||||
value: "testvalue"
|
||||
|
||||
- it: keeps existing labels (http)
|
||||
template: templates/gitea/http-svc.yaml
|
||||
set:
|
||||
service:
|
||||
http:
|
||||
labels: {}
|
||||
asserts:
|
||||
- exists:
|
||||
path: metadata.labels["app"]
|
@ -106,6 +106,7 @@ service:
|
||||
## @param service.http.ipFamilies HTTP service dual-stack familiy selection,for dual-stack parameters see official kubernetes [dual-stack concept documentation](https://kubernetes.io/docs/concepts/services-networking/dual-stack/).
|
||||
## @param service.http.loadBalancerSourceRanges Source range filter for http loadbalancer
|
||||
## @param service.http.annotations HTTP service annotations
|
||||
## @param service.http.labels HTTP service additional labels
|
||||
http:
|
||||
type: ClusterIP
|
||||
port: 3000
|
||||
@ -118,6 +119,7 @@ service:
|
||||
ipFamilies:
|
||||
loadBalancerSourceRanges: []
|
||||
annotations: {}
|
||||
labels: {}
|
||||
## @param service.ssh.type Kubernetes service type for ssh traffic
|
||||
## @param service.ssh.port Port number for ssh traffic
|
||||
## @param service.ssh.clusterIP ClusterIP setting for ssh autosetup for deployment is None
|
||||
@ -130,6 +132,7 @@ service:
|
||||
## @param service.ssh.hostPort HostPort for ssh service
|
||||
## @param service.ssh.loadBalancerSourceRanges Source range filter for ssh loadbalancer
|
||||
## @param service.ssh.annotations SSH service annotations
|
||||
## @param service.ssh.labels SSH service additional labels
|
||||
ssh:
|
||||
type: ClusterIP
|
||||
port: 22
|
||||
@ -143,6 +146,7 @@ service:
|
||||
hostPort:
|
||||
loadBalancerSourceRanges: []
|
||||
annotations: {}
|
||||
labels: {}
|
||||
|
||||
## @section Ingress
|
||||
## @param ingress.enabled Enable ingress
|
||||
|
Reference in New Issue
Block a user