Skip to content

Commit 28aa90c

Browse files
authored
fix: ensure all env var values are quoted (#515)
1 parent 78f6115 commit 28aa90c

File tree

8 files changed

+29
-21
lines changed

8 files changed

+29
-21
lines changed

charts/cf-runtime/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
description: A Helm chart for Codefresh Runner
33
name: cf-runtime
4-
version: 6.4.6
4+
version: 6.4.7
55
keywords:
66
- codefresh
77
- runner
@@ -18,7 +18,7 @@ annotations:
1818
# Supported kinds: `added`, `changed`, `deprecated`, `removed`, `fixed`, `security`:
1919
artifacthub.io/changes: |
2020
- kind: fixed
21-
description: "updated docker-builder version to allow users to specify the qemu image on docker builds"
21+
description: "ensure all env vars are quoted for engine and dind pods"
2222
dependencies:
2323
- name: cf-common
2424
repository: oci://quay.io/codefresh/charts

charts/cf-runtime/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Codefresh Runner
22

3-
![Version: 6.4.6](https://img.shields.io/badge/Version-6.4.6-informational?style=flat-square)
3+
![Version: 6.4.7](https://img.shields.io/badge/Version-6.4.7-informational?style=flat-square)
44

55
Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/installation/codefresh-runner/) to Kubernetes.
66

charts/cf-runtime/templates/runtime/runtime-env-spec-tmpl.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ runtimeScheduler:
2020
envVars:
2121
{{- with $engineContext.env }}
2222
{{- range $key, $val := . }}
23-
{{- if or (kindIs "bool" $val) (kindIs "int" $val) (kindIs "float64" $val) }}
2423
{{ $key }}: {{ $val | squote }}
25-
{{- else }}
26-
{{ $key }}: {{ $val }}
27-
{{- end }}
2824
{{- end }}
2925
{{- end }}
3026
COMPOSE_IMAGE: {{ include "runtime.runtimeImageName" (dict "registry" $imageRegistry "imageFullName" $engineContext.runtimeImages.COMPOSE_IMAGE) | squote }}
@@ -103,11 +99,7 @@ dockerDaemonScheduler:
10399
{{- with $dindContext.env }}
104100
envVars:
105101
{{- range $key, $val := . }}
106-
{{- if or (kindIs "bool" $val) (kindIs "int" $val) (kindIs "float64" $val) }}
107102
{{ $key }}: {{ $val | squote }}
108-
{{- else }}
109-
{{ $key }}: {{ $val }}
110-
{{- end }}
111103
{{- end }}
112104
{{- end }}
113105
cluster:

charts/cf-runtime/tests/private-registry/private_registry_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ tests:
4141
CONTAINER_LOGGER_EXEC_CHECK_INTERVAL_MS: '1000'
4242
DOCKER_REQUEST_TIMEOUT_MS: '30000'
4343
FORCE_COMPOSE_SERIAL_PULL: 'false'
44-
LOGGER_LEVEL: debug
44+
LOGGER_LEVEL: 'debug'
4545
LOG_OUTGOING_HTTP_REQUESTS: 'false'
4646
METRICS_PROMETHEUS_COLLECT_PROCESS_METRICS: 'false'
4747
METRICS_PROMETHEUS_ENABLED: 'true'
4848
METRICS_PROMETHEUS_ENABLE_LEGACY_METRICS: 'false'
49-
METRICS_PROMETHEUS_HOST: 0.0.0.0
49+
METRICS_PROMETHEUS_HOST: '0.0.0.0'
5050
METRICS_PROMETHEUS_PORT: '9100'
5151
COMPOSE_IMAGE: 'somedomain.io/codefresh/compose:tagoverride'
5252
CONTAINER_LOGGER_IMAGE: 'somedomain.io/codefresh/cf-container-logger:tagoverride'

charts/cf-runtime/tests/runtime/runtime_onprem_test.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ tests:
4747
envVars:
4848
CONTAINER_LOGGER_EXEC_CHECK_INTERVAL_MS: '1000'
4949
DOCKER_REQUEST_TIMEOUT_MS: '30000'
50-
FOO: BAR
50+
FLOAT_AS_STRING: '12.34'
51+
FOO: 'BAR'
5152
FORCE_COMPOSE_SERIAL_PULL: 'false'
52-
LOGGER_LEVEL: debug
53+
INT: '123'
54+
LOGGER_LEVEL: 'debug'
5355
LOG_OUTGOING_HTTP_REQUESTS: 'false'
5456
METRICS_PROMETHEUS_COLLECT_PROCESS_METRICS: 'false'
5557
METRICS_PROMETHEUS_ENABLED: 'true'
5658
METRICS_PROMETHEUS_ENABLE_LEGACY_METRICS: 'false'
57-
METRICS_PROMETHEUS_HOST: 0.0.0.0
59+
METRICS_PROMETHEUS_HOST: '0.0.0.0'
5860
METRICS_PROMETHEUS_PORT: '9100'
5961
COMPOSE_IMAGE: 'quay.io/codefresh/compose:tagoverride'
6062
CONTAINER_LOGGER_IMAGE: 'quay.io/codefresh/cf-container-logger:tagoverride'
@@ -117,8 +119,10 @@ tests:
117119
imagePullPolicy: IfNotPresent
118120
userAccess: true
119121
envVars:
120-
ALICE: BOB
122+
ALICE: 'BOB'
121123
DOCKER_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE: 'true'
124+
FLOAT_AS_STRING: '12.34'
125+
INT: '123'
122126
cluster:
123127
namespace: codefresh
124128
serviceAccount: service-account-override

charts/cf-runtime/tests/runtime/runtime_onprem_values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ runtime:
3030
reuseVolumeSortOrder: pipeline_id
3131
env:
3232
ALICE: BOB
33+
INT: 123
34+
FLOAT_AS_STRING: "12.34"
3335
podAnnotations:
3436
karpenter.sh/do-not-evict: "true"
3537
nodeSelector:
@@ -89,6 +91,8 @@ runtime:
8991
COSIGN_IMAGE_SIGNER_IMAGE: quay.io/codefresh/cf-cosign-image-signer:tagoverride
9092
env:
9193
FOO: BAR
94+
INT: 123
95+
FLOAT_AS_STRING: "12.34"
9296
podAnnotations:
9397
karpenter.sh/do-not-evict: "true"
9498
nodeSelector:

charts/cf-runtime/tests/runtime/runtime_test.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,16 @@ tests:
4848
envVars:
4949
CONTAINER_LOGGER_EXEC_CHECK_INTERVAL_MS: '1000'
5050
DOCKER_REQUEST_TIMEOUT_MS: '30000'
51-
FOO: BAR
51+
FLOAT: '12.34'
52+
FOO: 'BAR'
5253
FORCE_COMPOSE_SERIAL_PULL: 'false'
53-
LOGGER_LEVEL: debug
54+
INT_AS_STRING: '123'
55+
LOGGER_LEVEL: 'debug'
5456
LOG_OUTGOING_HTTP_REQUESTS: 'false'
5557
METRICS_PROMETHEUS_COLLECT_PROCESS_METRICS: 'false'
5658
METRICS_PROMETHEUS_ENABLED: 'true'
5759
METRICS_PROMETHEUS_ENABLE_LEGACY_METRICS: 'false'
58-
METRICS_PROMETHEUS_HOST: 0.0.0.0
60+
METRICS_PROMETHEUS_HOST: '0.0.0.0'
5961
METRICS_PROMETHEUS_PORT: '9100'
6062
COMPOSE_IMAGE: 'quay.io/codefresh/compose:tagoverride'
6163
CONTAINER_LOGGER_IMAGE: 'quay.io/codefresh/cf-container-logger:tagoverride'
@@ -127,8 +129,10 @@ tests:
127129
imagePullPolicy: Always
128130
userAccess: true
129131
envVars:
130-
ALICE: BOB
132+
ALICE: 'BOB'
131133
DOCKER_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE: 'true'
134+
FLOAT: '12.34'
135+
INT_AS_STRING: '123'
132136
cluster:
133137
namespace: codefresh
134138
serviceAccount: service-account-override

charts/cf-runtime/tests/runtime/runtime_values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ runtime:
1717
reuseVolumeSortOrder: pipeline_id
1818
env:
1919
ALICE: BOB
20+
INT_AS_STRING: "123"
21+
FLOAT: 12.34
2022
podAnnotations:
2123
karpenter.sh/do-not-evict: 'true'
2224
podLabels:
@@ -79,6 +81,8 @@ runtime:
7981
COSIGN_IMAGE_SIGNER_IMAGE: quay.io/codefresh/cf-cosign-image-signer:tagoverride
8082
env:
8183
FOO: BAR
84+
INT_AS_STRING: "123"
85+
FLOAT: 12.34
8286
userEnvVars:
8387
- name: ALICE
8488
valueFrom:

0 commit comments

Comments
 (0)