Skip to content

Commit

Permalink
support cron job (#546)
Browse files Browse the repository at this point in the history
* support cron job

* delete debug msg

* check training job create time exists

* update cron type

* fix submit args imagePullSecrets error

* fix imagePullSecrets args error

* fix cron command description
  • Loading branch information
heluocs authored Apr 27, 2021
1 parent f4d5df0 commit 54f3d37
Show file tree
Hide file tree
Showing 52 changed files with 8,462 additions and 456 deletions.
5 changes: 5 additions & 0 deletions charts/cron-tfjob/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### 0.1.0

* support cron task


6 changes: 6 additions & 0 deletions charts/cron-tfjob/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
description: Cron helm chart for Kubernetes.
name: cron
type: application
version: 1.0.0

32 changes: 32 additions & 0 deletions charts/cron-tfjob/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "tfjob.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "tfjob.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "tfjob.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Loading

0 comments on commit 54f3d37

Please sign in to comment.