feat(common): Release 2.0.0-beta.2 (#176)

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2023-09-14 15:40:49 +02:00 committed by GitHub
parent ed407c00df
commit 9928235b84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
80 changed files with 1306 additions and 161 deletions

View file

@ -0,0 +1,26 @@
{{/*
Renders the networkPolicy objects required by the chart.
*/}}
{{- define "bjw-s.common.render.networkpolicies" -}}
{{- /* Generate named networkPolicy as required */ -}}
{{- range $key, $networkPolicy := .Values.networkpolicies }}
{{- /* Enable networkPolicy by default, but allow override */ -}}
{{- $networkPolicyEnabled := true -}}
{{- if hasKey $networkPolicy "enabled" -}}
{{- $networkPolicyEnabled = $networkPolicy.enabled -}}
{{- end -}}
{{- if $networkPolicyEnabled -}}
{{- $networkPolicyValues := (mustDeepCopy $networkPolicy) -}}
{{- /* Create object from the raw networkPolicy values */ -}}
{{- $networkPolicyObject := (include "bjw-s.common.lib.networkpolicy.valuesToObject" (dict "rootContext" $ "id" $key "values" $networkPolicyValues)) | fromYaml -}}
{{- /* Perform validations on the networkPolicy before rendering */ -}}
{{- include "bjw-s.common.lib.networkpolicy.validate" (dict "rootContext" $ "object" $networkPolicyObject) -}}
{{/* Include the networkPolicy class */}}
{{- include "bjw-s.common.class.networkpolicy" (dict "rootContext" $ "object" $networkPolicyObject) | nindent 0 -}}
{{- end -}}
{{- end -}}
{{- end -}}