feat: made compatible with OCP (OKD or OpenShift) (#953)
Reviewed-on: https://code.forgejo.org/forgejo-helm/forgejo-helm/pulls/953 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Lucien Weller <lucien@wellernet.ch> Co-committed-by: Lucien Weller <lucien@wellernet.ch>
This commit is contained in:
parent
b691f297f1
commit
8bd2c48184
4 changed files with 69 additions and 8 deletions
25
unittests/deployment/security-context-normal.yaml
Normal file
25
unittests/deployment/security-context-normal.yaml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# $schema: https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: deployment template (security context)
|
||||
release:
|
||||
name: gitea-unittests
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/gitea/deployment.yaml
|
||||
- templates/gitea/config.yaml
|
||||
tests:
|
||||
- it: FS group set to 1000
|
||||
template: templates/gitea/deployment.yaml
|
||||
set:
|
||||
image.rootless: false
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.securityContext.fsGroup
|
||||
value: 1000
|
||||
- it: run configure-gitea with UID 1000
|
||||
template: templates/gitea/deployment.yaml
|
||||
set:
|
||||
image.rootless: false
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.initContainers[?(@.name == 'configure-gitea')].securityContext.runAsUser
|
||||
value: 1000
|
||||
Loading…
Add table
Add a link
Reference in a new issue