mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common): Release v2.1.0 (#221)
Co-authored-by: Christopher Larivière <lariviere.c@gmail.com>
This commit is contained in:
parent
272dbef383
commit
b360c9885a
18 changed files with 288 additions and 44 deletions
|
@ -6,6 +6,11 @@ using the common library.
|
|||
{{- $rootContext := .rootContext -}}
|
||||
{{- $cronjobObject := .object -}}
|
||||
|
||||
{{- $timeZone := "" -}}
|
||||
{{- if ge (int $rootContext.Capabilities.KubeVersion.Minor) 27 }}
|
||||
{{- $timeZone = dig "cronjob" "timeZone" "" $cronjobObject -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $labels := merge
|
||||
(dict "app.kubernetes.io/component" $cronjobObject.identifier)
|
||||
($cronjobObject.labels | default dict)
|
||||
|
@ -29,6 +34,9 @@ metadata:
|
|||
spec:
|
||||
concurrencyPolicy: "{{ $cronjobObject.cronjob.concurrencyPolicy }}"
|
||||
startingDeadlineSeconds: {{ $cronjobObject.cronjob.startingDeadlineSeconds }}
|
||||
{{- with $timeZone }}
|
||||
timeZone: "{{ . }}"
|
||||
{{- end }}
|
||||
schedule: "{{ $cronjobObject.cronjob.schedule }}"
|
||||
successfulJobsHistoryLimit: {{ $cronjobObject.cronjob.successfulJobsHistory }}
|
||||
failedJobsHistoryLimit: {{ $cronjobObject.cronjob.failedJobsHistory }}
|
||||
|
|
|
@ -43,6 +43,9 @@ spec:
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $ingressObject.defaultBackend }}
|
||||
defaultBackend: {{ $ingressObject.defaultBackend }}
|
||||
{{- else }}
|
||||
rules:
|
||||
{{- range $ingressObject.hosts }}
|
||||
- host: {{ tpl .host $rootContext | quote }}
|
||||
|
@ -56,7 +59,7 @@ spec:
|
|||
{{ $service := include "bjw-s.common.lib.service.getByIdentifier" (dict "rootContext" $rootContext "id" .service.name) | fromYaml -}}
|
||||
{{ $servicePort := 0 -}}
|
||||
|
||||
{{ if eq (dig "port" nil .service) nil -}}
|
||||
{{ if empty (dig "port" nil .service) -}}
|
||||
{{/* Default to the Service primary port if no port has been specified */ -}}
|
||||
{{ if $service -}}
|
||||
{{ $defaultServicePort := include "bjw-s.common.lib.service.primaryPort" (dict "rootContext" $rootContext "serviceObject" $service) | fromYaml -}}
|
||||
|
@ -78,4 +81,5 @@ spec:
|
|||
number: {{ $servicePort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -11,6 +11,9 @@ within the common library.
|
|||
{{- if $rootContext.Capabilities.APIVersions.Has (printf "gateway.networking.k8s.io/v1beta1/%s" $routeKind) }}
|
||||
{{- $apiVersion = "gateway.networking.k8s.io/v1beta1" -}}
|
||||
{{- end -}}
|
||||
{{- if $rootContext.Capabilities.APIVersions.Has (printf "gateway.networking.k8s.io/v1/%s" $routeKind) }}
|
||||
{{- $apiVersion = "gateway.networking.k8s.io/v1" -}}
|
||||
{{- end -}}
|
||||
{{- $labels := merge
|
||||
($routeObject.labels | default dict)
|
||||
(include "bjw-s.common.lib.metadata.allLabels" $rootContext | fromYaml)
|
||||
|
@ -46,9 +49,9 @@ spec:
|
|||
{{- end }}
|
||||
{{- if and (ne $routeKind "TCPRoute") (ne $routeKind "UDPRoute") $routeObject.hostnames }}
|
||||
hostnames:
|
||||
{{- with $routeObject.hostnames }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- range $routeObject.hostnames }}
|
||||
- {{ tpl . $rootContext | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range $routeObject.rules }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue