1+ suite : test extra environment settings
2+ templates :
3+ - templates/configmap.yaml
4+ - templates/daemonset.yaml
5+ - templates/daemonset-windows.yaml
6+ release :
7+ name : extra-env-release
8+ namespace : extra-env-namespace
9+ tests :
10+ - it : should instantiate daemonset with static and templatized extra environment variables when using fluentBit.extraEnv
11+ templates :
12+ - templates/daemonset.yaml
13+ - templates/daemonset-windows.yaml
14+ set :
15+ licenseKey : need_to_specify_this_otherwise_templates_wont_render
16+ someConfigurationKey : " someConfigurationValue"
17+ fluentBit :
18+ extraEnv :
19+ - name : EXTRA_ENV_VAR
20+ value : " extra_env_value"
21+ - name : EXTRA_ENV_VAR_WITH_TEMPLATE
22+ value : " should read from someConfigurationKey: {{ .Values.someConfigurationKey }}"
23+ enableWindows : true
24+ asserts :
25+ - contains :
26+ path : spec.template.spec.containers[0].env
27+ content :
28+ name : EXTRA_ENV_VAR
29+ value : " extra_env_value"
30+ - contains :
31+ path : spec.template.spec.containers[0].env
32+ content :
33+ name : EXTRA_ENV_VAR_WITH_TEMPLATE
34+ value : " should read from someConfigurationKey: someConfigurationValue"
35+ - it : should instantiate daemonset with static and templatized extra environment variables when using fluentBit.additionalEnvVariables
36+ templates :
37+ - templates/daemonset.yaml
38+ - templates/daemonset-windows.yaml
39+ set :
40+ licenseKey : need_to_specify_this_otherwise_templates_wont_render
41+ someConfigurationKey : " someConfigurationValue"
42+ fluentBit :
43+ additionalEnvVariables :
44+ - name : EXTRA_ENV_VAR
45+ value : " extra_env_value"
46+ - name : EXTRA_ENV_VAR_WITH_TEMPLATE
47+ value : " should read from someConfigurationKey: {{ .Values.someConfigurationKey }}"
48+ enableWindows : true
49+ asserts :
50+ - contains :
51+ path : spec.template.spec.containers[0].env
52+ content :
53+ name : EXTRA_ENV_VAR
54+ value : " extra_env_value"
55+ - contains :
56+ path : spec.template.spec.containers[0].env
57+ content :
58+ name : EXTRA_ENV_VAR_WITH_TEMPLATE
59+ value : " should read from someConfigurationKey: someConfigurationValue"
0 commit comments