Skip to content

Commit

Permalink
fix Helm pretty-printer for disabledAPIVersions (#3877)
Browse files Browse the repository at this point in the history
`disabledAPIVersions` is a list which Helm would print as `[item1 item2]` into
YAML, thus, corrupting the YAML format. This can be mitigated by applying the
Helm template function `toJson` (or `toYaml`) to the list in question which
would format the list as `["item1", "item2"]`. This is no issue for scalars,
since Helm's format coincidently matches the one required by YAML.
  • Loading branch information
stefanwire authored Feb 8, 2024
1 parent fd9628a commit 2b104a0
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions changelog.d/3-bug-fixes/WPB-6428
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix Helm pretty-printer for disabledAPIVersions
2 changes: 1 addition & 1 deletion charts/brig/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ data:
{{- if .setOAuthEnabled }}
setOAuthEnabled: {{ .setOAuthEnabled }}
{{- end }}
setDisabledAPIVersions: {{ .setDisabledAPIVersions }}
setDisabledAPIVersions: {{ toJson .setDisabledAPIVersions }}
{{- if .setOAuthRefreshTokenExpirationTimeSecs }}
setOAuthRefreshTokenExpirationTimeSecs: {{ .setOAuthRefreshTokenExpirationTimeSecs }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/cannon/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data:
millisecondsBetweenBatches: {{ .Values.config.drainOpts.millisecondsBetweenBatches }}
minBatchSize: {{ .Values.config.drainOpts.minBatchSize }}
disabledAPIVersions: {{ .Values.config.disabledAPIVersions }}
disabledAPIVersions: {{ toJson .Values.config.disabledAPIVersions }}
kind: ConfigMap
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/cargohold/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ data:
downloadLinkTTL: {{ .downloadLinkTTL }}
{{- end }}
federationDomain: {{ .federationDomain }}
disabledAPIVersions: {{ .disabledAPIVersions }}
disabledAPIVersions: {{ toJson .disabledAPIVersions }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/galley/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ data:
ed25519: "/etc/wire/galley/secrets/removal_ed25519.pem"
{{- end }}
{{- end }}
disabledAPIVersions: {{ .settings.disabledAPIVersions }}
disabledAPIVersions: {{ toJson .settings.disabledAPIVersions }}
{{- if .settings.featureFlags }}
{{- if .settings.guestLinkTTLSeconds }}
guestLinkTTLSeconds: {{ .settings.guestLinkTTLSeconds }}
Expand Down
2 changes: 1 addition & 1 deletion charts/gundeck/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ data:
{{- if hasKey . "perNativePushConcurrency" }}
perNativePushConcurrency: {{ .perNativePushConcurrency }}
{{- end }}
disabledAPIVersions: {{ .disabledAPIVersions }}
disabledAPIVersions: {{ toJson .disabledAPIVersions }}
# disabledAPIVersions: [ 2 ]
maxConcurrentNativePushes:
soft: {{ .maxConcurrentNativePushes.soft }}
Expand Down
2 changes: 1 addition & 1 deletion charts/proxy/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data:
logFormat: {{ .Values.config.logFormat }}
logLevel: {{ .Values.config.logLevel }}
logNetStrings: {{ .Values.config.logNetStrings }}
disabledAPIVersions: {{ .Values.config.disabledAPIVersions }}
disabledAPIVersions: {{ toJson .Values.config.disabledAPIVersions }}
host: 0.0.0.0
port: {{ .Values.service.internalPort }}
httpPoolSize: 1000
Expand Down
2 changes: 1 addition & 1 deletion charts/spar/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data:
maxScimTokens: {{ .maxScimTokens }}
disabledAPIVersions: {{ .disabledAPIVersions }}
disabledAPIVersions: {{ toJson .disabledAPIVersions }}
saml:
version: SAML2.0
Expand Down

0 comments on commit 2b104a0

Please sign in to comment.