mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release v3.3.0 (#335)
This commit is contained in:
parent
040eb7b9d2
commit
74f3170cec
19 changed files with 386 additions and 10 deletions
37
charts/library/common/templates/classes/_rawResource.tpl
Normal file
37
charts/library/common/templates/classes/_rawResource.tpl
Normal file
|
@ -0,0 +1,37 @@
|
|||
{{/*
|
||||
This template serves as a blueprint for all raw resource objects that are created
|
||||
within the common library.
|
||||
*/}}
|
||||
{{- define "bjw-s.common.class.rawResource" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $resourceObject := .object -}}
|
||||
|
||||
{{- $labels := merge
|
||||
($resourceObject.labels | default dict)
|
||||
(include "bjw-s.common.lib.metadata.allLabels" $rootContext | fromYaml)
|
||||
-}}
|
||||
{{- $annotations := merge
|
||||
($resourceObject.annotations | default dict)
|
||||
(include "bjw-s.common.lib.metadata.globalAnnotations" $rootContext | fromYaml)
|
||||
-}}
|
||||
---
|
||||
apiVersion: {{ $resourceObject.apiVersion }}
|
||||
kind: {{ $resourceObject.kind }}
|
||||
metadata:
|
||||
name: {{ $resourceObject.name }}
|
||||
{{- with $labels }}
|
||||
labels:
|
||||
{{- range $key, $value := . }}
|
||||
{{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with $annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{- printf "%s: %s" $key (tpl $value $rootContext | toYaml ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with $resourceObject.spec }}
|
||||
{{- tpl (toYaml .) $rootContext | nindent 0 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -93,7 +93,7 @@ spec:
|
|||
protocol: TCP
|
||||
{{- end }}
|
||||
name: {{ $name }}
|
||||
{{- if (and (eq $svcType "NodePort") (not (empty $port.nodePort))) }}
|
||||
{{- if (not (empty $port.nodePort)) }}
|
||||
nodePort: {{ $port.nodePort }}
|
||||
{{ end }}
|
||||
{{- if (not (empty $port.appProtocol)) }}
|
||||
|
|
|
@ -47,6 +47,9 @@ spec:
|
|||
app.kubernetes.io/component: {{ $statefulsetObject.identifier }}
|
||||
{{- include "bjw-s.common.lib.metadata.selectorLabels" $rootContext | nindent 6 }}
|
||||
serviceName: {{ include "bjw-s.common.lib.chart.names.fullname" $rootContext }}
|
||||
{{- with (dig "statefulset" "persistentVolumeClaimRetentionPolicy" nil $statefulsetObject) }}
|
||||
persistentVolumeClaimRetentionPolicy: {{ . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with (include "bjw-s.common.lib.pod.metadata.annotations" (dict "rootContext" $rootContext "controllerObject" $statefulsetObject)) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue