Skip to content

Commit dab98b2

Browse files
committed
charts_tips_and_tricks.md - quote password in case of special characters
Add quoting (using `| quote`) for password in imagePullSecret helper and removing additional (artifical) quote characters as those are added by `quote` func. This change allows to use more complicated password with e.g. quotes, backslashes and other special characters. Signed-off-by: Kamil Banach <[email protected]>
1 parent ce90447 commit dab98b2

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

i18n/de/docusaurus-plugin-content-docs/version-3/howto/charts_tips_and_tricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Wir definieren dann unsere Hilfsvorlage wie folgt:
169169
```
170170
{{- define "imagePullSecret" }}
171171
{{- with .Values.imageCredentials }}
172-
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
172+
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":%s,\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username (.password | quote) .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
173173
{{- end }}
174174
{{- end }}
175175
```

i18n/es/docusaurus-plugin-content-docs/version-3/howto/charts_tips_and_tricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Luego definimos nuestra plantilla auxiliar de la siguiente manera:
182182
```
183183
{{- define "imagePullSecret" }}
184184
{{- with .Values.imageCredentials }}
185-
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
185+
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":%s,\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username (.password | quote) .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
186186
{{- end }}
187187
{{- end }}
188188
```

i18n/ja/docusaurus-plugin-content-docs/version-3/howto/charts_tips_and_tricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ imageCredentials:
170170
```
171171
{{- define "imagePullSecret" }}
172172
{{- with .Values.imageCredentials }}
173-
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
173+
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":%s,\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username (.password | quote) .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
174174
{{- end }}
175175
{{- end }}
176176
```

i18n/ko/docusaurus-plugin-content-docs/version-3/howto/charts_tips_and_tricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ imageCredentials:
146146
```
147147
{{- define "imagePullSecret" }}
148148
{{- with .Values.imageCredentials }}
149-
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
149+
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":%s,\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username (.password | quote) .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
150150
{{- end }}
151151
{{- end }}
152152
```

i18n/zh/docusaurus-plugin-content-docs/version-3/howto/charts_tips_and_tricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ imageCredentials:
141141
```yaml
142142
{{- define "imagePullSecret" }}
143143
{{- with .Values.imageCredentials }}
144-
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
144+
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":%s,\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username (.password | quote) .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
145145
{{- end }}
146146
{{- end }}
147147
```

versioned_docs/version-3/howto/charts_tips_and_tricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ We then define our helper template as follows:
170170
```
171171
{{- define "imagePullSecret" }}
172172
{{- with .Values.imageCredentials }}
173-
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
173+
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":%s,\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username (.password | quote) .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
174174
{{- end }}
175175
{{- end }}
176176
```

0 commit comments

Comments
 (0)