mirror of
https://github.com/truenas/charts.git
synced 2026-11-17 22:59:08 +00:00
NAS-122681 / 23.10 / Handle longer ints in few places that might have one (#1358)
* Handle longer ints in few places that might have one * add tests * add note * Add some more checking
This commit is contained in:
1 parent
1dd9059ee1
commit
087d5be7cc
10 files changed
+186
-9
No files matched your search
@@ -376,7 +376,65 @@ tests:
|
||||
- name: S6_READ_ONLY_ROOT
|
||||
value: "1"
|
||||
|
||||
# Failures
|
||||
- it: should create the correct fixed envs with large int values
|
||||
set:
|
||||
image: *image
|
||||
workload:
|
||||
workload-name:
|
||||
enabled: true
|
||||
primary: true
|
||||
type: Deployment
|
||||
podSpec:
|
||||
securityContext:
|
||||
fsGroup: 100000514
|
||||
containers:
|
||||
container-name1:
|
||||
enabled: true
|
||||
primary: true
|
||||
imageSelector: image
|
||||
probes: *probes
|
||||
fixedEnv:
|
||||
PUID: 200000514
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
runAsNonRoot: false
|
||||
asserts:
|
||||
- documentIndex: &deploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *deploymentDoc
|
||||
isAPIVersion:
|
||||
of: apps/v1
|
||||
- documentIndex: *deploymentDoc
|
||||
isSubset:
|
||||
path: spec.template.spec.containers[0]
|
||||
content:
|
||||
env:
|
||||
- name: TZ
|
||||
value: UTC
|
||||
- name: UMASK
|
||||
value: "002"
|
||||
- name: UMASK_SET
|
||||
value: "002"
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: "void"
|
||||
- name: PUID
|
||||
value: "200000514"
|
||||
- name: USER_ID
|
||||
value: "200000514"
|
||||
- name: UID
|
||||
value: "200000514"
|
||||
- name: PGID
|
||||
value: "100000514"
|
||||
- name: GROUP_ID
|
||||
value: "100000514"
|
||||
- name: GID
|
||||
value: "100000514"
|
||||
- name: S6_READ_ONLY_ROOT
|
||||
value: "1"
|
||||
|
||||
# # Failures
|
||||
- it: it should fail with NVIDIA_CAPS having invalid values
|
||||
set:
|
||||
image: *image
|
||||
|
||||
@@ -35,6 +35,14 @@ tests:
|
||||
value: "{{ .Values.some_other_value }}"
|
||||
- name: env3
|
||||
value: ""
|
||||
- name: env4
|
||||
value: 100000514
|
||||
- name: env5
|
||||
value: "100000514"
|
||||
- name: env6
|
||||
value: 100text000514
|
||||
- name: env7
|
||||
value: "100.400"
|
||||
asserts:
|
||||
- documentIndex: &deploymentDoc 0
|
||||
isKind:
|
||||
@@ -60,6 +68,30 @@ tests:
|
||||
content:
|
||||
name: env3
|
||||
value: ""
|
||||
- documentIndex: *deploymentDoc
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: env4
|
||||
value: "100000514"
|
||||
- documentIndex: *deploymentDoc
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: env5
|
||||
value: "100000514"
|
||||
- documentIndex: *deploymentDoc
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: env6
|
||||
value: "100text000514"
|
||||
- documentIndex: *deploymentDoc
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: env7
|
||||
value: "100.400"
|
||||
|
||||
# Failures
|
||||
- it: it should fail with empty name
|
||||
|
||||
@@ -66,6 +66,10 @@ tests:
|
||||
fieldPath: metadata.name
|
||||
VAR8: ""
|
||||
VAR9: false
|
||||
VAR10: "100000514"
|
||||
VAR11: 100000514
|
||||
VAR12: 1000text00514
|
||||
VAR13: "100.40"
|
||||
asserts:
|
||||
- documentIndex: &deploymentDoc 2
|
||||
isKind:
|
||||
@@ -141,6 +145,30 @@ tests:
|
||||
content:
|
||||
name: VAR9
|
||||
value: "false"
|
||||
- documentIndex: *deploymentDoc
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: VAR10
|
||||
value: "100000514"
|
||||
- documentIndex: *deploymentDoc
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: VAR11
|
||||
value: "100000514"
|
||||
- documentIndex: *deploymentDoc
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: VAR12
|
||||
value: "1000text00514"
|
||||
- documentIndex: *deploymentDoc
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: VAR13
|
||||
value: "100.40"
|
||||
|
||||
# Failures
|
||||
- it: it should fail invalid ref
|
||||
|
||||
@@ -134,6 +134,35 @@ tests:
|
||||
- name: some_other_name
|
||||
value: "some_different_value"
|
||||
|
||||
- it: should pass with fsGroup and supplementalGroups with long int
|
||||
set:
|
||||
workload:
|
||||
workload-name1:
|
||||
enabled: true
|
||||
primary: true
|
||||
type: Deployment
|
||||
podSpec:
|
||||
securityContext:
|
||||
fsGroup: 100000514
|
||||
fsGroupChangePolicy: Always
|
||||
supplementalGroups:
|
||||
- 1002
|
||||
- 100000514
|
||||
asserts:
|
||||
- documentIndex: *deploymentDoc
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *deploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.securityContext
|
||||
value:
|
||||
fsGroup: 100000514
|
||||
fsGroupChangePolicy: Always
|
||||
supplementalGroups:
|
||||
- 1002
|
||||
- 100000514
|
||||
sysctls: []
|
||||
|
||||
- it: should pass with sysctls automatically appended based on services
|
||||
set:
|
||||
some_sysctl_name: some_name
|
||||
|
||||
Reference in new issue
Block a user