Add initial support for job type workloads
This commit is contained in:
parent
7ca337a5f8
commit
73e0b275cc
|
@ -1,3 +1,16 @@
|
||||||
|
# Workload type
|
||||||
|
- variable: workloadType
|
||||||
|
description: "Please specify type of workload to deploy"
|
||||||
|
lablel: "Workload Type"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "Deployment"
|
||||||
|
required: true
|
||||||
|
enum:
|
||||||
|
- "Deployment"
|
||||||
|
- "Job"
|
||||||
|
- "CronJob"
|
||||||
|
|
||||||
# Image related
|
# Image related
|
||||||
- variable: image
|
- variable: image
|
||||||
description: "Docker Image Details"
|
description: "Docker Image Details"
|
||||||
|
@ -38,6 +51,7 @@
|
||||||
label: "Update Strategy"
|
label: "Update Strategy"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
show_if: [["workloadType", "=", "Deployment"]]
|
||||||
default: "RollingUpdate"
|
default: "RollingUpdate"
|
||||||
enum:
|
enum:
|
||||||
- "RollingUpdate"
|
- "RollingUpdate"
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: {{ .Values.workloadType }}
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "ix-chart.fullname" . }}
|
name: {{ include "ix-chart.fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "ix-chart.labels" . | nindent 4 }}
|
{{- include "ix-chart.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
{{- if eq .Values.workloadType "Deployment" }}
|
||||||
strategy:
|
strategy:
|
||||||
type: {{ .Values.updateStrategy }}
|
type: {{ .Values.updateStrategy }}
|
||||||
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "ix-chart.selectorLabels" . | nindent 6 }}
|
{{- include "ix-chart.selectorLabels" . | nindent 6 }}
|
||||||
|
|
|
@ -6,10 +6,6 @@ image:
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: "testing"
|
tag: "testing"
|
||||||
|
|
||||||
|
|
||||||
# Update strategy
|
|
||||||
updateStrategy: "RollingUpdate"
|
|
||||||
|
|
||||||
# Restart Policy
|
# Restart Policy
|
||||||
restartPolicy: "Always"
|
restartPolicy: "Always"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue