diff --git a/charts/common-job/Chart.yaml b/charts/common-job/Chart.yaml new file mode 100644 index 0000000..55639e7 --- /dev/null +++ b/charts/common-job/Chart.yaml @@ -0,0 +1,16 @@ +apiVersion: v2 +name: common-job +type: application +description: Helm chart for job +version: 1.5.0 +appVersion: "v1.0" +home: https://github.com/Romanow/helm-charts/tree/master/charts/common-job +icon: https://raw.githubusercontent.com/Romanow/helm-charts/master/icons/job.png +sources: + - https://kubernetes.io/docs/concepts/workloads/controllers/job/ +keywords: + - job +maintainers: + - name: Romanov Alexey + email: romanowalex@mail.ru + url: https://romanow.github.io diff --git a/charts/common-job/README.md b/charts/common-job/README.md new file mode 100644 index 0000000..d606f11 --- /dev/null +++ b/charts/common-job/README.md @@ -0,0 +1,104 @@ +# Helm Chart for common-job + +![Version: 1.5.0](https://img.shields.io/badge/Version-1.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.0](https://img.shields.io/badge/AppVersion-v1.0-informational?style=flat-square) + +Helm chart for job + +### Installing the Chart + +To install the chart with the release name `common-job`: + +```shell +$ helm repo add romanow https://romanow.github.io/helm-charts/ +$ helm repo update +$ helm install common-job romanow/common-job +``` + +### Uninstalling the Chart + +To uninstall the `common-job` installation: + +```shell +helm uninstall common-job +``` + +### Configuration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyTypeDefaultDescription
argslist
+[]
+
+
Job startup arguments
backoffLimitint
+5
+
+
Backoff limit
environmentslist
+[]
+
+
Additional env variables
imageobject
+{
+  "pullPolicy": "IfNotPresent",
+  "repository": null,
+  "tag": null
+}
+
+
Image name and version
restartPolicystring
+"Never"
+
+
Restart policy
secretslist
+[]
+
+
Additional secrets
+ +### Sources + +* + +### Maintainer + +| Name | Email | Url | +| ---- | ------ | --- | +| Romanov Alexey | | | diff --git a/charts/common-job/README.md.gotmpl b/charts/common-job/README.md.gotmpl new file mode 100644 index 0000000..7ec3487 --- /dev/null +++ b/charts/common-job/README.md.gotmpl @@ -0,0 +1,71 @@ +{{- define "repository.organization" -}} +romanow +{{- end -}} + +{{- define "repository.url" -}} +https://github.com/romanow/helm-charts +{{- end -}} + +{{- define "helm.url" -}} +https://romanow.github.io/helm-charts/ +{{- end -}} + +{{- define "helm.path" -}} +{{ template "repository.organization" . }}/{{ template "chart.name" . }} +{{- end -}} + +{{- define "install" -}} +### Installing the Chart + +To install the chart with the release name `{{ template "chart.name" . }}`: + +```shell +$ helm repo add {{ template "repository.organization" . }} {{ template "helm.url" . }} +$ helm repo update +$ helm install {{ template "chart.name" . }} {{ template "helm.path" . }} +``` +{{- end -}} + +{{- define "uninstall" -}} +### Uninstalling the Chart + +To uninstall the `{{ template "chart.name" . }}` installation: + +```shell +helm uninstall {{ template "chart.name" . }} +``` +{{- end -}} + +{{- define "configuration.header" -}} +### Configuration +{{- end -}} + +{{- define "maintainers.header" -}} +### Maintainer +{{- end -}} + +{{- define "sources.header" -}} +### Sources +{{- end -}} + +# Helm Chart for {{ template "chart.name" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} + +{{ template "chart.description" . }} + +{{ template "install" . }} + +{{ template "uninstall" . }} + +{{ template "configuration.header" . }} + +{{ template "chart.valuesTableHtml" . }} + +{{ template "sources.header" . }} + +{{ template "chart.sourcesList" . }} + +{{ template "maintainers.header" . }} + +{{ template "chart.maintainersTable" . }} diff --git a/charts/common-job/ci/test-values.yaml b/charts/common-job/ci/test-values.yaml new file mode 100644 index 0000000..ac49045 --- /dev/null +++ b/charts/common-job/ci/test-values.yaml @@ -0,0 +1,9 @@ +image: + pullPolicy: IfNotPresent + repository: busybox + tag: 1.35 + +args: + - /bin/sh + - -c + - echo Hello, world diff --git a/charts/common-job/templates/NOTES.txt b/charts/common-job/templates/NOTES.txt new file mode 100644 index 0000000..5fb3c67 --- /dev/null +++ b/charts/common-job/templates/NOTES.txt @@ -0,0 +1,4 @@ +You have deployed the following release: {{ .Release.Name }}. +To get further information, you can run the commands: + $ helm status {{ .Release.Name }} + $ helm get all {{ .Release.Name }} diff --git a/charts/common-job/templates/job.yaml b/charts/common-job/templates/job.yaml new file mode 100644 index 0000000..f16e16f --- /dev/null +++ b/charts/common-job/templates/job.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ .Release.Name }} + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + app.kubernetes.io/component: application + app.kubernetes.io/managed-by: helm +spec: + backoffLimit: 5 + activeDeadlineSeconds: 60 + ttlSecondsAfterFinished: 60 + template: + spec: + restartPolicy: {{ .Values.restartPolicy }} + containers: + - name: {{ .Release.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + {{- range $arg := .Values.args }} + - "{{ tpl $arg $ }}" + {{- end }} + env: + {{- range $env := .Values.environments }} + - name: {{ $env.name }} + value: "{{ $env.value }}" + {{- end }} + {{- range $secret := .Values.secrets }} + - name: {{ $secret.name }} + valueFrom: + secretKeyRef: + name: {{ $secret.secretName }} + key: {{ $secret.secretKey }} + {{- end }} diff --git a/charts/common-job/values.yaml b/charts/common-job/values.yaml new file mode 100644 index 0000000..19c59dc --- /dev/null +++ b/charts/common-job/values.yaml @@ -0,0 +1,20 @@ +# -- Image name and version +image: + pullPolicy: IfNotPresent + repository: + tag: + +# -- Additional env variables +environments: [] + +# -- Additional secrets +secrets: [] + +# -- Job startup arguments +args: [] + +# -- Restart policy +restartPolicy: Never + +# -- Backoff limit +backoffLimit: 5 diff --git a/icons/job.png b/icons/job.png new file mode 100644 index 0000000..f43f999 Binary files /dev/null and b/icons/job.png differ