feat(common): Release 2.0.0 (#189)

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2023-10-02 13:21:17 +02:00 committed by GitHub
parent 8a42d212af
commit 98677d85b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 1192 additions and 1804 deletions

View file

@ -0,0 +1,17 @@
{{/*
Return a service port number by name for a Service object
*/}}
{{- define "bjw-s.common.lib.service.getPortNumberByName" -}}
{{- $rootContext := .rootContext -}}
{{- $identifier := .serviceID -}}
{{- $portName := .portName -}}
{{- $service := include "bjw-s.common.lib.service.getByIdentifier" (dict "rootContext" $rootContext "id" $identifier) | fromYaml -}}
{{- if $service -}}
{{ $servicePort := dig "ports" $portName "port" nil $service -}}
{{- if not (eq $servicePort nil) -}}
{{- $servicePort -}}
{{- end -}}
{{- end -}}
{{- end -}}