Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Charts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏国强
Charts
Commits
557d379c
Commit
557d379c
authored
Oct 08, 2020
by
Waqar Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix restart policy for jobs/cronjobs
parent
ac7af88e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
6 deletions
+26
-6
charts/ix-chart/2009.0.1/questions.yaml
charts/ix-chart/2009.0.1/questions.yaml
+11
-0
charts/ix-chart/2009.0.1/templates/_helpers.tpl
charts/ix-chart/2009.0.1/templates/_helpers.tpl
+12
-0
charts/ix-chart/2009.0.1/templates/deployment.yaml
charts/ix-chart/2009.0.1/templates/deployment.yaml
+3
-3
charts/ix-chart/2009.0.1/values.yaml
charts/ix-chart/2009.0.1/values.yaml
+0
-3
No files found.
charts/ix-chart/2009.0.1/questions.yaml
View file @
557d379c
...
...
@@ -63,11 +63,22 @@
label
:
"
Restart
Policy"
schema
:
type
:
string
show_if
:
[[
"
workloadType"
,
"
="
,
"
Deployment"
]]
default
:
"
Always"
enum
:
-
"
Always"
-
"
OnFailure"
-
"
Never"
-
variable
:
jobRestartPolicy
description
:
"
Restart
Policy
for
workload"
label
:
"
Restart
Policy"
schema
:
type
:
string
default
:
"
OnFailure"
show_if
:
[[
"
workloadType"
,
"
!="
,
"
Deployment"
]]
enum
:
-
"
OnFailure"
-
"
Never"
# Configurable CMD / Entrypoint / Environment Variables
-
variable
:
containerCommand
...
...
charts/ix-chart/2009.0.1/templates/_helpers.tpl
View file @
557d379c
...
...
@@ -96,3 +96,15 @@ Get API Version based on workload type
{{- printf "batch/v1" }}
{{- end }}
{{- end }}
{
{
/*
Get
Restart
policy
based
on
workload
type
*/
}
}
{{- define "restartPolicy" -}}
{{- if eq (include "workloadIsDeployment" .) "true" }}
{{- printf "%s" .Values.restartPolicy }}
{{- else }}
{{- printf "%s" .Values.jobRestartPolicy }}
{{- end }}
{{- end }}
charts/ix-chart/2009.0.1/templates/deployment.yaml
View file @
557d379c
...
...
@@ -5,13 +5,13 @@ metadata:
labels
:
{{
- include "ix-chart.labels" . | nindent 4
}}
spec
:
{{
- if eq
.Values.workloadType "Deployment
"
}}
{{
- if eq
(include "workloadIsDeployment" .) "true
"
}}
strategy
:
type
:
{{
.Values.updateStrategy
}}
{{
- end
}}
selector
:
matchLabels
:
{{
- include "ix-chart.selectorLabels" . | nindent 6
}}
{{
- end
}}
template
:
metadata
:
labels
:
...
...
@@ -22,7 +22,7 @@ spec:
k8s.v1.cni.cncf.io/networks
:
{{
join "
,
"
.Values.ixExternalInterfacesConfigurationNames
}}
{{-
end
}}
spec:
restartPolicy:
{{
.Values.restartPolicy
|
quote
}}
restartPolicy:
{{
template
"
restartPolicy" .
}}
containers
:
-
name
:
{{
.Chart.Name
}}
{{
- if or .Values.hostPathVolumes .Values.persistentVolumeClaims
}}
...
...
charts/ix-chart/2009.0.1/values.yaml
View file @
557d379c
...
...
@@ -6,9 +6,6 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag
:
"
testing"
# Restart Policy
restartPolicy
:
"
Always"
# Container CMD / entrypoint
containerCommand
:
[]
containerArgs
:
[]
...
...
Write
Preview
Markdown
is supported
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