mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common)!: Release v3.0.0-beta1 (#278)
This commit is contained in:
parent
deafcf75a1
commit
b78483b0b8
88 changed files with 3697 additions and 1209 deletions
|
@ -20,6 +20,8 @@ using the common library.
|
|||
($cronjobObject.annotations | default dict)
|
||||
(include "bjw-s.common.lib.metadata.globalAnnotations" $rootContext | fromYaml)
|
||||
-}}
|
||||
|
||||
{{- $cronJobSettings := dig "cronjob" dict $cronjobObject -}}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
|
@ -32,26 +34,24 @@ metadata:
|
|||
annotations: {{- toYaml . | nindent 4 -}}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with $cronjobObject.cronjob.suspend }}
|
||||
suspend: {{ ternary "true" "false" . }}
|
||||
{{- end }}
|
||||
concurrencyPolicy: "{{ $cronjobObject.cronjob.concurrencyPolicy }}"
|
||||
startingDeadlineSeconds: {{ $cronjobObject.cronjob.startingDeadlineSeconds }}
|
||||
suspend: {{ default false $cronJobSettings.suspend }}
|
||||
concurrencyPolicy: {{ default "Forbid" $cronJobSettings.concurrencyPolicy }}
|
||||
startingDeadlineSeconds: {{ default 30 $cronJobSettings.startingDeadlineSeconds }}
|
||||
{{- with $timeZone }}
|
||||
timeZone: "{{ . }}"
|
||||
timeZone: {{ . }}
|
||||
{{- end }}
|
||||
schedule: "{{ $cronjobObject.cronjob.schedule }}"
|
||||
successfulJobsHistoryLimit: {{ $cronjobObject.cronjob.successfulJobsHistory }}
|
||||
failedJobsHistoryLimit: {{ $cronjobObject.cronjob.failedJobsHistory }}
|
||||
schedule: {{ $cronJobSettings.schedule | quote }}
|
||||
successfulJobsHistoryLimit: {{ default 1 $cronJobSettings.successfulJobsHistory }}
|
||||
failedJobsHistoryLimit: {{ default 1 $cronJobSettings.failedJobsHistory }}
|
||||
jobTemplate:
|
||||
spec:
|
||||
{{- with $cronjobObject.cronjob.ttlSecondsAfterFinished }}
|
||||
{{- with $cronJobSettings.ttlSecondsAfterFinished }}
|
||||
ttlSecondsAfterFinished: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $cronjobObject.cronjob.parallelism }}
|
||||
{{- with $cronJobSettings.parallelism }}
|
||||
parallelism: {{ . }}
|
||||
{{- end }}
|
||||
backoffLimit: {{ $cronjobObject.cronjob.backoffLimit }}
|
||||
backoffLimit: {{ default 6 $cronJobSettings.backoffLimit }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with (include "bjw-s.common.lib.pod.metadata.annotations" (dict "rootContext" $rootContext "controllerObject" $cronjobObject)) }}
|
||||
|
|
|
@ -27,7 +27,7 @@ metadata:
|
|||
annotations: {{- toYaml . | nindent 4 -}}
|
||||
{{- end }}
|
||||
spec:
|
||||
revisionHistoryLimit: {{ $daemonsetObject.revisionHistoryLimit }}
|
||||
revisionHistoryLimit: {{ default 3 $daemonsetObject.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: {{ $daemonsetObject.identifier }}
|
||||
|
|
|
@ -27,9 +27,13 @@ metadata:
|
|||
annotations: {{- toYaml . | nindent 4 -}}
|
||||
{{- end }}
|
||||
spec:
|
||||
revisionHistoryLimit: {{ $deploymentObject.revisionHistoryLimit }}
|
||||
{{- if not (eq $deploymentObject.replicas nil) }}
|
||||
revisionHistoryLimit: {{ default 3 $deploymentObject.revisionHistoryLimit }}
|
||||
{{- if hasKey $deploymentObject "replicas" }}
|
||||
{{- if not (eq $deploymentObject.replicas nil) }}
|
||||
replicas: {{ $deploymentObject.replicas }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
replicas: 1
|
||||
{{- end }}
|
||||
strategy:
|
||||
type: {{ $deploymentObject.strategy }}
|
||||
|
|
|
@ -15,6 +15,8 @@ within the common library.
|
|||
($jobObject.annotations | default dict)
|
||||
(include "bjw-s.common.lib.metadata.globalAnnotations" $rootContext | fromYaml)
|
||||
-}}
|
||||
|
||||
{{- $jobSettings := dig "job" dict $jobObject -}}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
|
@ -27,22 +29,20 @@ metadata:
|
|||
annotations: {{- toYaml . | nindent 4 -}}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with $jobObject.job.suspend }}
|
||||
suspend: {{ ternary "true" "false" . }}
|
||||
{{- end }}
|
||||
{{- with $jobObject.job.ttlSecondsAfterFinished }}
|
||||
suspend: {{ default false $jobSettings.suspend }}
|
||||
{{- with $jobSettings.ttlSecondsAfterFinished }}
|
||||
ttlSecondsAfterFinished: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $jobObject.job.parallelism }}
|
||||
{{- with $jobSettings.parallelism }}
|
||||
parallelism: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $jobObject.job.completions }}
|
||||
{{- with $jobSettings.completions }}
|
||||
completions: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $jobObject.job.completionMode }}
|
||||
{{- with $jobSettings.completionMode }}
|
||||
completionMode: {{ . }}
|
||||
{{- end }}
|
||||
backoffLimit: {{ $jobObject.job.backoffLimit }}
|
||||
backoffLimit: {{ default 6 $jobSettings.backoffLimit }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with (include "bjw-s.common.lib.pod.metadata.annotations" (dict "rootContext" $rootContext "controllerObject" $jobObject)) }}
|
||||
|
|
|
@ -6,7 +6,7 @@ within the common library.
|
|||
{{- $rootContext := .rootContext -}}
|
||||
{{- $serviceObject := .object -}}
|
||||
|
||||
{{- $svcType := $serviceObject.type | default "" -}}
|
||||
{{- $svcType := default "ClusterIP" $serviceObject.type -}}
|
||||
{{- $enabledPorts := include "bjw-s.common.lib.service.enabledPorts" (dict "rootContext" $rootContext "serviceObject" $serviceObject) | fromYaml }}
|
||||
{{- $labels := merge
|
||||
(dict "app.kubernetes.io/service" $serviceObject.name)
|
||||
|
@ -29,7 +29,7 @@ metadata:
|
|||
annotations: {{- toYaml . | nindent 4 -}}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if (or (eq $svcType "ClusterIP") (empty $svcType)) }}
|
||||
{{- if (eq $svcType "ClusterIP") }}
|
||||
type: ClusterIP
|
||||
{{- if $serviceObject.clusterIP }}
|
||||
clusterIP: {{ $serviceObject.clusterIP }}
|
||||
|
|
|
@ -27,7 +27,7 @@ metadata:
|
|||
annotations: {{- toYaml . | nindent 4 -}}
|
||||
{{- end }}
|
||||
spec:
|
||||
revisionHistoryLimit: {{ $statefulsetObject.revisionHistoryLimit }}
|
||||
revisionHistoryLimit: {{ default 3 $statefulsetObject.revisionHistoryLimit }}
|
||||
replicas: {{ $statefulsetObject.replicas }}
|
||||
podManagementPolicy: {{ dig "statefulset" "podManagementPolicy" "OrderedReady" $statefulsetObject }}
|
||||
updateStrategy:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue