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/
|
||||
node_modules/
|
||||
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
|
||||
commands:
|
||||
- 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
|
||||
- make unittests
|
||||
|
||||
|
|
10
README.md
10
README.md
|
@ -675,6 +675,7 @@ gitea:
|
|||
| `tolerations` | Tolerations for the statefulset | `[]` |
|
||||
| `affinity` | Affinity for the statefulset | `{}` |
|
||||
| `dnsConfig` | dnsConfig for the statefulset | `{}` |
|
||||
| `priorityClassName` | priorityClassName for the statefulset | `""` |
|
||||
| `statefulset.env` | Additional environment variables to pass to containers | `[]` |
|
||||
| `statefulset.terminationGracePeriodSeconds` | How long to wait until forcefully kill the pod | `60` |
|
||||
| `statefulset.labels` | Labels for the statefulset | `{}` |
|
||||
|
@ -699,9 +700,12 @@ gitea:
|
|||
|
||||
### Init
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------- | --------------------------------------------------------------------- | ----- |
|
||||
| `initPreScript` | Bash shell script copied verbatim to the start of the init-container. | `""` |
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------ | ------------------------------------------------------------------------------------ | ------- |
|
||||
| `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
|
||||
|
||||
|
|
|
@ -41,6 +41,13 @@
|
|||
"depNameTemplate": "forgejo",
|
||||
"packageNameTemplate": "codeberg.org/forgejo/forgejo",
|
||||
"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 }}
|
||||
schedulerName: "{{ .Values.schedulerName }}"
|
||||
{{- end }}
|
||||
{{- if .Values.priorityClassName }}
|
||||
priorityClassName: "{{ .Values.priorityClassName }}"
|
||||
{{- end }}
|
||||
{{- include "gitea.images.pullSecrets" . | nindent 6 }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
|
@ -76,6 +79,8 @@ spec:
|
|||
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||
resources:
|
||||
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||
- name: init-app-ini
|
||||
image: "{{ include "gitea.image" . }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
|
@ -114,6 +119,8 @@ spec:
|
|||
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||
resources:
|
||||
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||
{{- if .Values.signing.enabled }}
|
||||
- name: configure-gpg
|
||||
image: "{{ include "gitea.image" . }}"
|
||||
|
@ -143,6 +150,8 @@ spec:
|
|||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: configure-gitea
|
||||
image: "{{ include "gitea.image" . }}"
|
||||
|
@ -232,6 +241,8 @@ spec:
|
|||
subPath: {{ .Values.persistence.subPath }}
|
||||
{{- end }}
|
||||
{{- include "gitea.init-additional-mounts" . | nindent 12 }}
|
||||
resources:
|
||||
{{- toYaml .Values.initContainers.resources | nindent 12 }}
|
||||
terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
|
|
|
@ -8,6 +8,10 @@ tests:
|
|||
- it: runs gpg in batch mode
|
||||
set:
|
||||
signing.enabled: true
|
||||
signing.privateKey: |-
|
||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
{placeholder}
|
||||
-----END PGP PRIVATE KEY BLOCK-----
|
||||
asserts:
|
||||
- equal:
|
||||
path: stringData["configure_gpg_environment.sh"]
|
||||
|
@ -38,6 +42,10 @@ tests:
|
|||
- it: adds gpg script block for enabled signing
|
||||
set:
|
||||
signing.enabled: true
|
||||
signing.privateKey: |-
|
||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
{placeholder}
|
||||
-----END PGP PRIVATE KEY BLOCK-----
|
||||
asserts:
|
||||
- equal:
|
||||
path: stringData["init_directory_structure.sh"]
|
||||
|
|
|
@ -17,9 +17,9 @@ tests:
|
|||
- it: skips gpg env in `init-directories` init container
|
||||
template: templates/gitea/statefulset.yaml
|
||||
set:
|
||||
signing.enabled: true
|
||||
signing.enabled: false
|
||||
asserts:
|
||||
- contains:
|
||||
- notContains:
|
||||
path: spec.template.spec.initContainers[0].env
|
||||
content:
|
||||
name: GNUPGHOME
|
||||
|
|
|
@ -42,6 +42,7 @@ tests:
|
|||
template: templates/gitea/statefulset.yaml
|
||||
set:
|
||||
signing.enabled: true
|
||||
signing.existingSecret: "custom-gpg-secret"
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.initContainers[0].env
|
||||
|
@ -52,6 +53,7 @@ tests:
|
|||
template: templates/gitea/statefulset.yaml
|
||||
set:
|
||||
signing.enabled: true
|
||||
signing.existingSecret: "custom-gpg-secret"
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
|
@ -63,6 +65,7 @@ tests:
|
|||
set:
|
||||
signing:
|
||||
enabled: true
|
||||
existingSecret: "forgejo-unittests-gpg-key"
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.volumes
|
||||
|
|
13
values.yaml
13
values.yaml
|
@ -189,6 +189,9 @@ affinity: {}
|
|||
## @param dnsConfig dnsConfig for the statefulset
|
||||
dnsConfig: {}
|
||||
|
||||
## @param priorityClassName priorityClassName for the statefulset
|
||||
priorityClassName: ""
|
||||
|
||||
## @param statefulset.env Additional environment variables to pass to containers
|
||||
## @param statefulset.terminationGracePeriodSeconds How long to wait until forcefully kill the pod
|
||||
## @param statefulset.labels Labels for the statefulset
|
||||
|
@ -255,6 +258,16 @@ initPreScript: ""
|
|||
# chown -R git:git /data/git/.postgresql/
|
||||
# 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
|
||||
## @section Signing
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue