Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
barry cho
Rancher
Commits
ae388fd8
Commit
ae388fd8
authored
4 years ago
by
Jiaqi Luo
Browse files
Options
Download
Email Patches
Plain Diff
Add a template function to better handle the system default registry in post-delete-hook-job
parent
71e607dc
release/v2.5.9-debug1
not-release/v2.5.11
rc-19
release/v2.5
release/v2.5.11
release/v2.5.11-alt
release/v2.5.11-patch1
release/v2.5.8
release/v2.5.8-patch1
release/v2.5.8-patch2
release/v2.5.8-patch3
release/v2.5.9
Tags unavailable
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
chart/templates/_helpers.tpl
+10
-0
chart/templates/_helpers.tpl
chart/templates/post-delete-hook-job.yaml
+1
-1
chart/templates/post-delete-hook-job.yaml
with
11 additions
and
1 deletion
+11
-1
chart/templates/_helpers.tpl
+
10
-
0
View file @
ae388fd8
...
...
@@ -33,3 +33,13 @@ chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- end }}
{{- define "system_default_registry" -}}
{{- if .Values.systemDefaultRegistry -}}
{{- if hasSuffix "/" .Values.systemDefaultRegistry -}}
{{- printf "%s" .Values.systemDefaultRegistry -}}
{{- else -}}
{{- printf "%s/" .Values.systemDefaultRegistry -}}
{{- end -}}
{{- end -}}
{{- end -}}
This diff is collapsed.
Click to expand it.
chart/templates/post-delete-hook-job.yaml
+
1
-
1
View file @
ae388fd8
...
...
@@ -20,7 +20,7 @@ spec:
restartPolicy
:
OnFailure
containers
:
-
name
:
{{
template "rancher.name" .
}}
-post-delete
image
:
"
{{
.Values.
system
D
efault
R
egistry
}}{{
.Values.postDelete.image.repository
}}:{{
.Values.postDelete.image.tag
}}"
image
:
"
{{
include
"
system
_d
efault
_r
egistry
" .
}}{{ .Values.postDelete.image.repository }}:{{ .Values.postDelete.image.tag }}"
imagePullPolicy
:
IfNotPresent
securityContext
:
runAsUser
:
0
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help