fix: Allow 0 enabledPorts (#84)

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-11-19 14:47:43 +01:00 committed by GitHub
parent a2a0b8ea2b
commit eed8d60822
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 34 additions and 38 deletions

View file

@ -3,7 +3,7 @@ apiVersion: v2
name: common
description: Function library for Helm charts
type: library
version: 1.1.0
version: 1.1.1
kubeVersion: ">=1.22.0-0"
keywords:
- common

View file

@ -1,6 +1,6 @@
# common
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)
![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)
Function library for Helm charts
@ -29,7 +29,7 @@ Include this chart as a dependency in your `Chart.yaml` e.g.
# Chart.yaml
dependencies:
- name: common
version: 1.1.0
version: 1.1.1
repository: https://bjw-s.github.io/helm-charts/
```

View file

@ -15,9 +15,5 @@ Return the enabled ports for a given Service object.
{{- end -}}
{{- end -}}
{{- end -}}
{{- if eq 0 (len $enabledPorts) }}
{{- fail (printf "No ports are enabled for service \"%s\"!" (.serviceName | default "")) }}
{{- end }}
{{- $enabledPorts | toYaml -}}
{{- end -}}