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
7aa966cb
Commit
7aa966cb
authored
Oct 08, 2020
by
Waqar Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add method to convert cron object to cron expression
parent
50218820
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
charts/ix-chart/2009.0.1/templates/_helpers.tpl
charts/ix-chart/2009.0.1/templates/_helpers.tpl
+8
-0
charts/ix-chart/2009.0.1/templates/_workload.tpl
charts/ix-chart/2009.0.1/templates/_workload.tpl
+1
-1
charts/ix-chart/2009.0.1/templates/workload.yaml
charts/ix-chart/2009.0.1/templates/workload.yaml
+1
-1
No files found.
charts/ix-chart/2009.0.1/templates/_helpers.tpl
View file @
7aa966cb
...
...
@@ -61,3 +61,11 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{
{
/*
Convert
cron
schema
object
to
cron
format
*/
}
}
{{- define "cronExpression" }}
{{- printf "%s %s %s %s %s " .minute .hour .dom .month .dow }}
{{- end }}
charts/ix-chart/2009.0.1/templates/_workload.tpl
View file @
7aa966cb
...
...
@@ -127,7 +127,7 @@ template:
CronJob
Spec
*/
}
}
{{- define "cronJobSpec" }}
schedule: {{ .Values.cronSchedule | quote }}
schedule: {{
include "cronExpression"
.Values.cronSchedule | quote }}
jobTemplate:
spec:
{{ include "jobSpec" . | nindent 4 }}
...
...
charts/ix-chart/2009.0.1/templates/workload.yaml
View file @
7aa966cb
...
...
@@ -9,6 +9,6 @@ spec:
{{
include "deploymentSpec" . | nindent 2
}}
{{
- else if eq (include "workloadIsCronJob" .) "true"
}}
{{
include "cronJobSpec" . | nindent 2
}}
{{
- else
}}
}
{{
- else
}}
{{
include "jobSpec" . | nindent 2
}}
{{
- end
}}
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