You've already forked helm-gitea
feat(deployment): support further initContainers
The following patch intoduce the dictionaries pre and postExtraInitContainers. The dictionaries can be used to specify further initContainers before and after the gitea initializing process. For example: ```yaml postExtraInitContainers: - name: foo image: docker.io/library/busybox:latest preExtraInitContainers: - name: bar image: docker.io/library/busybox:latest ```
This commit is contained in:
59
unittests/helm/deployment/extraInitContainers.yaml
Normal file
59
unittests/helm/deployment/extraInitContainers.yaml
Normal file
@ -0,0 +1,59 @@
|
||||
suite: deployment template
|
||||
release:
|
||||
name: gitea-unittests
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/gitea/deployment.yaml
|
||||
- templates/gitea/config.yaml
|
||||
tests:
|
||||
- it: Render the deployment (default)
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
template: templates/gitea/deployment.yaml
|
||||
- lengthEqual:
|
||||
path: spec.template.spec.initContainers
|
||||
count: 3
|
||||
template: templates/gitea/deployment.yaml
|
||||
|
||||
- it: Render the deployment (signing)
|
||||
set:
|
||||
signing.enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
template: templates/gitea/deployment.yaml
|
||||
- lengthEqual:
|
||||
path: spec.template.spec.initContainers
|
||||
count: 4
|
||||
template: templates/gitea/deployment.yaml
|
||||
|
||||
- it: Render the deployment (extraInitContainers)
|
||||
set:
|
||||
postExtraInitContainers:
|
||||
- name: foo
|
||||
image: docker.io/library/busybox:latest
|
||||
preExtraInitContainers:
|
||||
- name: bar
|
||||
image: docker.io/library/busybox:latest
|
||||
signing.enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
template: templates/gitea/deployment.yaml
|
||||
- lengthEqual:
|
||||
path: spec.template.spec.initContainers
|
||||
count: 6
|
||||
template: templates/gitea/deployment.yaml
|
||||
- contains:
|
||||
path: spec.template.spec.initContainers
|
||||
content:
|
||||
name: foo
|
||||
image: docker.io/library/busybox:latest
|
||||
template: templates/gitea/deployment.yaml
|
||||
- contains:
|
||||
path: spec.template.spec.initContainers
|
||||
content:
|
||||
name: bar
|
||||
image: docker.io/library/busybox:latest
|
||||
template: templates/gitea/deployment.yaml
|
Reference in New Issue
Block a user