feat: merge upstream changes (#124)
This commit is contained in:
commit
985e878e5b
10 changed files with 55 additions and 7 deletions
|
@ -1,4 +1,5 @@
|
||||||
.gitea/
|
.gitea/
|
||||||
node_modules/
|
node_modules/
|
||||||
charts/
|
charts/
|
||||||
.helmignore
|
.helmignore
|
||||||
|
Chart.lock
|
||||||
|
|
1
.prettierignore
Normal file
1
.prettierignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Chart.lock
|
|
@ -36,7 +36,7 @@ pipeline:
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache make helm git bash
|
- apk add --no-cache make helm git bash
|
||||||
- helm plugin install https://github.com/helm-unittest/helm-unittest
|
- helm plugin install --version 0.3.1 https://github.com/helm-unittest/helm-unittest
|
||||||
- helm dependency update
|
- helm dependency update
|
||||||
- make unittests
|
- make unittests
|
||||||
|
|
||||||
|
|
10
README.md
10
README.md
|
@ -675,6 +675,7 @@ gitea:
|
||||||
| `tolerations` | Tolerations for the statefulset | `[]` |
|
| `tolerations` | Tolerations for the statefulset | `[]` |
|
||||||
| `affinity` | Affinity for the statefulset | `{}` |
|
| `affinity` | Affinity for the statefulset | `{}` |
|
||||||
| `dnsConfig` | dnsConfig for the statefulset | `{}` |
|
| `dnsConfig` | dnsConfig for the statefulset | `{}` |
|
||||||
|
| `priorityClassName` | priorityClassName for the statefulset | `""` |
|
||||||
| `statefulset.env` | Additional environment variables to pass to containers | `[]` |
|
| `statefulset.env` | Additional environment variables to pass to containers | `[]` |
|
||||||
| `statefulset.terminationGracePeriodSeconds` | How long to wait until forcefully kill the pod | `60` |
|
| `statefulset.terminationGracePeriodSeconds` | How long to wait until forcefully kill the pod | `60` |
|
||||||
| `statefulset.labels` | Labels for the statefulset | `{}` |
|
| `statefulset.labels` | Labels for the statefulset | `{}` |
|
||||||
|
@ -699,9 +700,12 @@ gitea:
|
||||||
|
|
||||||
### Init
|
### Init
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| --------------- | --------------------------------------------------------------------- | ----- |
|
| ------------------------------------------ | ------------------------------------------------------------------------------------ | ------- |
|
||||||
| `initPreScript` | Bash shell script copied verbatim to the start of the init-container. | `""` |
|
| `initPreScript` | Bash shell script copied verbatim to the start of the init-container. | `""` |
|
||||||
|
| `initContainers.resources.limits` | initContainers.limits Kubernetes resource limits for init containers | `{}` |
|
||||||
|
| `initContainers.resources.requests.cpu` | initContainers.requests.cpu Kubernetes cpu resource limits for init containers | `100m` |
|
||||||
|
| `initContainers.resources.requests.memory` | initContainers.requests.memory Kubernetes memory resource limits for init containers | `128Mi` |
|
||||||
|
|
||||||
### Signing
|
### Signing
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,13 @@
|
||||||
"depNameTemplate": "forgejo",
|
"depNameTemplate": "forgejo",
|
||||||
"packageNameTemplate": "codeberg.org/forgejo/forgejo",
|
"packageNameTemplate": "codeberg.org/forgejo/forgejo",
|
||||||
"datasourceTemplate": "docker"
|
"datasourceTemplate": "docker"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileMatch": ["^\\.woodpecker/[a-z-]+\\.yml$"],
|
||||||
|
"matchStrings": ["helm plugin install --version (?<currentValue>.+?) https://github.com/helm-unittest/helm-unittest\\s"],
|
||||||
|
"depNameTemplate": "helm-unittest",
|
||||||
|
"packageNameTemplate": "helm-unittest/helm-unittest",
|
||||||
|
"datasourceTemplate": "github-releases"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,9 @@ spec:
|
||||||
{{- if .Values.schedulerName }}
|
{{- if .Values.schedulerName }}
|
||||||
schedulerName: "{{ .Values.schedulerName }}"
|
schedulerName: "{{ .Values.schedulerName }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.priorityClassName }}
|
||||||
|
priorityClassName: "{{ .Values.priorityClassName }}"
|
||||||
|
{{- end }}
|
||||||
{{- include "gitea.images.pullSecrets" . | nindent 6 }}
|
{{- include "gitea.images.pullSecrets" . | nindent 6 }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
@ -76,6 +79,8 @@ spec:
|
||||||
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||||
- name: init-app-ini
|
- name: init-app-ini
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
@ -114,6 +119,8 @@ spec:
|
||||||
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||||
{{- if .Values.signing.enabled }}
|
{{- if .Values.signing.enabled }}
|
||||||
- name: configure-gpg
|
- name: configure-gpg
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
|
@ -143,6 +150,8 @@ spec:
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- if .Values.extraVolumeMounts }}
|
||||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: configure-gitea
|
- name: configure-gitea
|
||||||
image: "{{ include "gitea.image" . }}"
|
image: "{{ include "gitea.image" . }}"
|
||||||
|
@ -232,6 +241,8 @@ spec:
|
||||||
subPath: {{ .Values.persistence.subPath }}
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||||
terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }}
|
terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
|
|
|
@ -8,6 +8,10 @@ tests:
|
||||||
- it: runs gpg in batch mode
|
- it: runs gpg in batch mode
|
||||||
set:
|
set:
|
||||||
signing.enabled: true
|
signing.enabled: true
|
||||||
|
signing.privateKey: |-
|
||||||
|
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||||
|
{placeholder}
|
||||||
|
-----END PGP PRIVATE KEY BLOCK-----
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: stringData["configure_gpg_environment.sh"]
|
path: stringData["configure_gpg_environment.sh"]
|
||||||
|
@ -38,6 +42,10 @@ tests:
|
||||||
- it: adds gpg script block for enabled signing
|
- it: adds gpg script block for enabled signing
|
||||||
set:
|
set:
|
||||||
signing.enabled: true
|
signing.enabled: true
|
||||||
|
signing.privateKey: |-
|
||||||
|
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||||
|
{placeholder}
|
||||||
|
-----END PGP PRIVATE KEY BLOCK-----
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: stringData["init_directory_structure.sh"]
|
path: stringData["init_directory_structure.sh"]
|
||||||
|
|
|
@ -17,9 +17,9 @@ tests:
|
||||||
- it: skips gpg env in `init-directories` init container
|
- it: skips gpg env in `init-directories` init container
|
||||||
template: templates/gitea/statefulset.yaml
|
template: templates/gitea/statefulset.yaml
|
||||||
set:
|
set:
|
||||||
signing.enabled: true
|
signing.enabled: false
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- notContains:
|
||||||
path: spec.template.spec.initContainers[0].env
|
path: spec.template.spec.initContainers[0].env
|
||||||
content:
|
content:
|
||||||
name: GNUPGHOME
|
name: GNUPGHOME
|
||||||
|
|
|
@ -42,6 +42,7 @@ tests:
|
||||||
template: templates/gitea/statefulset.yaml
|
template: templates/gitea/statefulset.yaml
|
||||||
set:
|
set:
|
||||||
signing.enabled: true
|
signing.enabled: true
|
||||||
|
signing.existingSecret: "custom-gpg-secret"
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
path: spec.template.spec.initContainers[0].env
|
path: spec.template.spec.initContainers[0].env
|
||||||
|
@ -52,6 +53,7 @@ tests:
|
||||||
template: templates/gitea/statefulset.yaml
|
template: templates/gitea/statefulset.yaml
|
||||||
set:
|
set:
|
||||||
signing.enabled: true
|
signing.enabled: true
|
||||||
|
signing.existingSecret: "custom-gpg-secret"
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
path: spec.template.spec.containers[0].env
|
path: spec.template.spec.containers[0].env
|
||||||
|
@ -63,6 +65,7 @@ tests:
|
||||||
set:
|
set:
|
||||||
signing:
|
signing:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
existingSecret: "forgejo-unittests-gpg-key"
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
path: spec.template.spec.volumes
|
path: spec.template.spec.volumes
|
||||||
|
|
13
values.yaml
13
values.yaml
|
@ -189,6 +189,9 @@ affinity: {}
|
||||||
## @param dnsConfig dnsConfig for the statefulset
|
## @param dnsConfig dnsConfig for the statefulset
|
||||||
dnsConfig: {}
|
dnsConfig: {}
|
||||||
|
|
||||||
|
## @param priorityClassName priorityClassName for the statefulset
|
||||||
|
priorityClassName: ""
|
||||||
|
|
||||||
## @param statefulset.env Additional environment variables to pass to containers
|
## @param statefulset.env Additional environment variables to pass to containers
|
||||||
## @param statefulset.terminationGracePeriodSeconds How long to wait until forcefully kill the pod
|
## @param statefulset.terminationGracePeriodSeconds How long to wait until forcefully kill the pod
|
||||||
## @param statefulset.labels Labels for the statefulset
|
## @param statefulset.labels Labels for the statefulset
|
||||||
|
@ -255,6 +258,16 @@ initPreScript: ""
|
||||||
# chown -R git:git /data/git/.postgresql/
|
# chown -R git:git /data/git/.postgresql/
|
||||||
# chmod 400 /data/git/.postgresql/postgresql.key
|
# chmod 400 /data/git/.postgresql/postgresql.key
|
||||||
|
|
||||||
|
## @param initContainers.resources.limits initContainers.limits Kubernetes resource limits for init containers
|
||||||
|
## @param initContainers.resources.requests.cpu initContainers.requests.cpu Kubernetes cpu resource limits for init containers
|
||||||
|
## @param initContainers.resources.requests.memory initContainers.requests.memory Kubernetes memory resource limits for init containers
|
||||||
|
initContainers:
|
||||||
|
resources:
|
||||||
|
limits: {}
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
|
||||||
# Configure commit/action signing prerequisites
|
# Configure commit/action signing prerequisites
|
||||||
## @section Signing
|
## @section Signing
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue