Skip to content

Commit be5d212

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 5a5e5b7 commit be5d212

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

content/de/docs/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
```

content/en/docs/howto/charts_tips_and_tricks.md

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

content/es/docs/howto/charts_tips_and_tricks.md

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

content/ja/docs/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
```

content/ko/docs/howto/charts_tips_and_tricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ imageCredentials:
156156
```
157157
{{- define "imagePullSecret" }}
158158
{{- with .Values.imageCredentials }}
159-
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
159+
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":%s,\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username (.password | quote) .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
160160
{{- end }}
161161
{{- end }}
162162
```

content/zh/docs/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
```

0 commit comments

Comments
 (0)