feat(common): Release common-3.0.4 (#294)

This commit is contained in:
Bernd Schorgers 2024-03-15 09:33:07 +01:00 committed by GitHub
parent 9541ab44fe
commit 23164367ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
89 changed files with 427 additions and 216 deletions

View file

@ -0,0 +1,9 @@
---
controllers:
main:
containers:
main:
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 31
pullPolicy: IfNotPresent

View file

@ -3,6 +3,8 @@
suite: Chart validations suite: Chart validations
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: advancedMounts invalid controller reference should fail - it: advancedMounts invalid controller reference should fail
set: set:

View file

@ -3,6 +3,8 @@
suite: configmap metadata suite: configmap metadata
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: configMap names suite: configMap names
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: configmap Pod metadata suite: configmap Pod metadata
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: container args override suite: container args override
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: container command override suite: container command override
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: container env values suite: container env values
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: container envFrom values suite: container envFrom values
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: container restartPolicy suite: container restartPolicy
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: container image tag suite: container image tag
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: string tag should pass - it: string tag should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: container name suite: container name
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: with explicit name should pass - it: with explicit name should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: container ports suite: container ports
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,7 +3,8 @@
suite: container probes suite: container probes
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
set: set:
controllers.main.containers.main.probes.liveness.enabled: true controllers.main.containers.main.probes.liveness.enabled: true
controllers.main.containers.main.probes.readiness.enabled: true controllers.main.containers.main.probes.readiness.enabled: true

View file

@ -3,6 +3,8 @@
suite: Container validations suite: Container validations
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: image repository is required - it: image repository is required
set: set:

View file

@ -3,6 +3,8 @@
suite: container volumeMounts suite: container volumeMounts
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: no persistence should pass - it: no persistence should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: container workingDir override suite: container workingDir override
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: cronjob configuration suite: cronjob configuration
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default cronjob configuration should pass - it: default cronjob configuration should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: job configuration suite: job configuration
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default job configuration should pass - it: default job configuration should pass
set: set:

View file

@ -3,7 +3,8 @@
suite: controller metadata cronjob suite: controller metadata cronjob
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
set: set:
controllers.main.cronjob.schedule: "*/20 * * * *" controllers.main.cronjob.schedule: "*/20 * * * *"

View file

@ -3,6 +3,8 @@
suite: controller metadata daemonset suite: controller metadata daemonset
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: controller metadata deployment suite: controller metadata deployment
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: controller metadata job suite: controller metadata job
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: controller metadata statefulset suite: controller metadata statefulset
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: controller types suite: controller types
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,10 +3,9 @@
suite: ingress metadata suite: ingress metadata
templates: templates:
- common.yaml - common.yaml
values: values:
- ../_values/ingress_main_default_hosts.yaml - ../_values/ingress_main_default_hosts.yaml
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
asserts: asserts:

View file

@ -3,6 +3,9 @@
suite: ingress presence suite: ingress presence
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,10 +3,9 @@
suite: ingress service reference suite: ingress service reference
templates: templates:
- common.yaml - common.yaml
values: values:
- ../_values/ingress_main_default_hosts.yaml - ../_values/ingress_main_default_hosts.yaml
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
set: set:

View file

@ -3,10 +3,9 @@
suite: ingress tls suite: ingress tls
templates: templates:
- common.yaml - common.yaml
values: values:
- ../_values/ingress_main_default_hosts.yaml - ../_values/ingress_main_default_hosts.yaml
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,11 +3,10 @@
suite: ingress values suite: ingress values
templates: templates:
- common.yaml - common.yaml
values: values:
- ../_values/ingress_main_default_hosts.yaml - ../_values/ingress_main_default_hosts.yaml
- ../_values/service_main_default.yaml - ../_values/service_main_default.yaml
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: nameOverride tests suite: nameOverride tests
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default name is set to release name - it: default name is set to release name
asserts: asserts:

View file

@ -12,6 +12,8 @@ set:
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: networkPolicy names suite: networkPolicy names
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: NetworkPolicy validations suite: NetworkPolicy validations
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: networkpolicy requires either controller reference or podSelector - it: networkpolicy requires either controller reference or podSelector
set: set:

View file

@ -3,7 +3,8 @@
suite: NetworkPolicy values suite: NetworkPolicy values
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: main networkpolicy is disabled by default - it: main networkpolicy is disabled by default
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: persistence claimnames suite: persistence claimnames
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: persistence configmap suite: persistence configmap
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: configmap persistence type should pass - it: configmap persistence type should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: persistence custom suite: persistence custom
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: custom persistence type should pass - it: custom persistence type should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: persistence emptydir suite: persistence emptydir
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default emptyDir should pass - it: default emptyDir should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: persistence hostpath suite: persistence hostpath
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: hostPath should pass - it: hostPath should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: persistence nfs suite: persistence nfs
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: nfs persistence type should pass - it: nfs persistence type should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: persistence secret suite: persistence secret
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: secret persistence type should pass - it: secret persistence type should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: persistence volumeclaimtemplates suite: persistence volumeclaimtemplates
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: persistence volumes suite: persistence volumes
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: no persistence should pass - it: no persistence should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod with multiple containers suite: pod with multiple containers
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: with explicit name should pass - it: with explicit name should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: pod sidecar containers suite: pod sidecar containers
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: with default order - it: with default order
set: set:

View file

@ -3,6 +3,8 @@
suite: pod affinity suite: pod affinity
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod dnsConfig suite: pod dnsConfig
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod dnsPolicy suite: pod dnsPolicy
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod enableServiceLinks suite: pod enableServiceLinks
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod hostAliases suite: pod hostAliases
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod security suite: pod security
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod hostNetwork suite: pod hostNetwork
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod security suite: pod security
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod imagePullSecrets suite: pod imagePullSecrets
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod nodeSelector suite: pod nodeSelector
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod replicas suite: pod replicas
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod securityContext suite: pod securityContext
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod serviceAccount suite: pod serviceAccount
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod tolerations suite: pod tolerations
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod topologySpreadConstraints suite: pod topologySpreadConstraints
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: pod initContainers suite: pod initContainers
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: with custom env vars dict should pass - it: with custom env vars dict should pass
set: set:

View file

@ -3,7 +3,8 @@
suite: pvc datasource suite: pvc datasource
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
set: set:
persistence.config: persistence.config:
accessMode: ReadWriteOnce accessMode: ReadWriteOnce

View file

@ -3,7 +3,8 @@
suite: pvc metadata suite: pvc metadata
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
set: set:
persistence.config: persistence.config:
accessMode: ReadWriteOnce accessMode: ReadWriteOnce

View file

@ -3,7 +3,8 @@
suite: pvc names suite: pvc names
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
set: set:
persistence.config: persistence.config:
accessMode: ReadWriteOnce accessMode: ReadWriteOnce

View file

@ -3,7 +3,8 @@
suite: pvc storageclass suite: pvc storageclass
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
set: set:
persistence.config: persistence.config:
accessMode: ReadWriteOnce accessMode: ReadWriteOnce

View file

@ -3,6 +3,8 @@
suite: pvc values suite: pvc values
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default enabled should pass - it: default enabled should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: route metadata suite: route metadata
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: route presence suite: route presence
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: route service reference suite: route service reference
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: route values suite: route values
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: setting gateway should pass - it: setting gateway should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: secret metadata suite: secret metadata
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: secret names suite: secret names
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
asserts: asserts:

View file

@ -3,6 +3,8 @@
suite: secret Pod metadata suite: secret Pod metadata
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
set: set:

View file

@ -3,6 +3,8 @@
suite: service metadata suite: service metadata
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default metadata should pass - it: default metadata should pass
values: values:

View file

@ -3,6 +3,8 @@
suite: service names suite: service names
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
values: values:

View file

@ -3,6 +3,8 @@
suite: service protocols suite: service protocols
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
values: values:

View file

@ -3,6 +3,8 @@
suite: service ports suite: service ports
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: default should pass - it: default should pass
values: values:

View file

@ -3,6 +3,8 @@
suite: Service validations suite: Service validations
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: invalid controller reference should fail - it: invalid controller reference should fail
set: set:

View file

@ -3,6 +3,8 @@
suite: service values suite: service values
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: ports and services are enabled by default - it: ports and services are enabled by default
set: set:

View file

@ -3,6 +3,8 @@
suite: serviceAccount values suite: serviceAccount values
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: a serviceAccount is not created by default - it: a serviceAccount is not created by default
asserts: asserts:

View file

@ -3,7 +3,8 @@
suite: serviceMonitor values suite: serviceMonitor values
templates: templates:
- common.yaml - common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests: tests:
- it: a serviceMonitor is not created by default - it: a serviceMonitor is not created by default
asserts: asserts:

View file

@ -1,9 +0,0 @@
---
controllers:
main:
containers:
main:
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 31
pullPolicy: IfNotPresent

View file

@ -3,7 +3,7 @@ apiVersion: v2
name: common name: common
description: Function library for Helm charts description: Function library for Helm charts
type: library type: library
version: 3.0.3 version: 3.0.4
kubeVersion: ">=1.22.0-0" kubeVersion: ">=1.22.0-0"
keywords: keywords:
- common - common
@ -16,7 +16,4 @@ annotations:
artifacthub.io/changes: |- artifacthub.io/changes: |-
- kind: fixed - kind: fixed
description: |- description: |-
Fixed probes intermittently choosing the wrong service Improved fix for preventing potential incorrect controller references
- kind: fixed
description: |-
Prevent potential incorrect controller references

View file

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

View file

@ -36,14 +36,13 @@
] ]
}, },
"env": { "env": {
"anyOf": [ "oneOf": [
{ {
"type": "array", "type": "array",
"items": { "items": {
"anyOf": [ "anyOf": [
{"$ref": "#/envValueWithName"}, {"$ref": "envVars.json#/envVarListItem"},
{"$ref": "#/envValueFromWithName"}, {"$ref": "envVars.json#/valueFromListItem"}
{"$ref": "#/envImplicitValueFromWithName"}
] ]
} }
}, },
@ -51,10 +50,9 @@
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"anyOf": [ "anyOf": [
{"type": ["string", "number", "boolean", "null"]}, {"$ref": "envVars.json#/envVarValue"},
{"$ref": "#/envValue"}, {"$ref": "envVars.json#/envVarItem"},
{"$ref": "#/envValueFrom"}, {"$ref": "envVars.json#/valueFromItem"}
{"$ref": "#/envImplicitValueFrom"}
] ]
} }
} }
@ -164,180 +162,6 @@
} }
}, },
"envValueWithName": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"value": {
"type": ["string", "number", "boolean", "null"]
}
},
"required": ["name", "value"]
},
"envValue": {
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": ["string", "number", "boolean", "null"]
},
"dependsOn": {"$ref": "#/envDependsOn"}
},
"required": ["value"]
},
"envValueFromWithName": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"valueFrom": {
"oneOf": [
{"$ref": "#/envValueFrom.fieldRef"},
{"$ref": "#/envValueFrom.secretKeyRef"}
]
},
"dependsOn": {"$ref": "#/envDependsOn"}
},
"required": ["name", "valueFrom"]
},
"envValueFrom": {
"type": "object",
"additionalProperties": false,
"properties": {
"valueFrom": {
"oneOf": [
{"$ref": "#/envValueFrom.fieldRef"},
{"$ref": "#/envValueFrom.secretKeyRef"}
]
},
"dependsOn": {"$ref": "#/envDependsOn"}
},
"required": ["valueFrom"]
},
"envImplicitValueFromWithName": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"fieldRef": {"$ref": "#/envValueFrom.fieldPath"},
"secretKeyRef": {"$ref": "#/envValueFrom.secretKeyRef"},
"configMapKeyRef": {"$ref": "#/envValueFrom.configMapKeyRef"}
},
"required": ["name"],
"dependencies": {
"fieldRef": {
"allOf": [
{"not": {"required": ["secretKeyRef"]}},
{"not": {"required": ["configMapKeyRef"]}}
]
},
"secretKeyRef": {
"allOf": [
{"not": {"required": ["fieldRef"]}},
{"not": {"required": ["configMapKeyRef"]}}
]
},
"configMapKeyRef": {
"allOf": [
{"not": {"required": ["secretKeyRef"]}},
{"not": {"required": ["configMapKeyRef"]}}
]
}
}
},
"envImplicitValueFrom": {
"type": "object",
"oneOf": [
{"$ref": "#/envValueFrom.fieldRef"},
{"$ref": "#/envValueFrom.secretKeyRef"},
{"$ref": "#/envValueFrom.configMapKeyRef"}
]
},
"envDependsOn": {
"oneOf": [
{"type": "string"},
{"type": "array", "items": {"type": "string"}}
]
},
"envValueFrom.secretKeyRef": {
"type": "object",
"additionalProperties": false,
"properties": {
"secretKeyRef": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
}
},
"required": ["name", "key"]
}
},
"required": ["secretKeyRef"]
},
"envValueFrom.configMapKeyRef": {
"type": "object",
"additionalProperties": false,
"properties": {
"configMapKeyRef": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
}
},
"required": ["name", "key"]
}
},
"required": ["configMapKeyRef"]
},
"envValueFrom.fieldRef": {
"type": "object",
"additionalProperties": false,
"properties": {
"fieldRef": {
"$ref": "#/envValueFrom.fieldPath"
}
},
"required": ["fieldRef"]
},
"envValueFrom.fieldPath": {
"type": "object",
"additionalProperties": false,
"properties": {
"apiVersion": {
"type": "string"
},
"fieldPath": {
"type": "string"
}
},
"required": ["fieldPath"]
},
"probe": { "probe": {
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {

View file

@ -0,0 +1,245 @@
{
"envVarValue": {
"type": ["string", "number", "boolean", "null"]
},
"envVarListItem": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {"type": "string"},
"value": {"$ref": "#/envVarValue"}
},
"required": ["name", "value"]
},
"envVarItem": {
"type": "object",
"additionalProperties": false,
"properties": {
"value": {"$ref": "#/envVarValue"},
"dependsOn": {"$ref": "#/envVarDependsOn"}
},
"required": ["value"]
},
"valueFromListItem": {
"oneOf": [
{"$ref": "#/valueFromListItemExplicit"},
{"$ref": "#/valueFromListItemImplicit"}
]
},
"valueFromListItemExplicit": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {"type": "string"},
"valueFrom": {"$ref": "#/valueFromOptions"}
},
"required": ["name", "valueFrom"]
},
"valueFromListItemImplicit": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {"type": "string"},
"fieldRef": {"$ref": "#/fieldRefSelector"},
"resourceFieldRef": {"$ref": "#/resourceFieldRefSelector"},
"secretKeyRef": {"$ref": "#/objectKeySelector"},
"configMapKeyRef": {"$ref": "#/objectKeySelector"}
},
"required": ["name"],
"dependencies": {
"fieldRef": {
"allOf": [
{"not": {"required": ["resourceFieldRef"]}},
{"not": {"required": ["secretKeyRef"]}},
{"not": {"required": ["configMapKeyRef"]}}
]
},
"resourceFieldRef": {
"allOf": [
{"not": {"required": ["fieldRef"]}},
{"not": {"required": ["secretKeyRef"]}},
{"not": {"required": ["configMapKeyRef"]}}
]
},
"secretKeyRef": {
"allOf": [
{"not": {"required": ["fieldRef"]}},
{"not": {"required": ["resourceFieldRef"]}},
{"not": {"required": ["configMapKeyRef"]}}
]
},
"configMapKeyRef": {
"allOf": [
{"not": {"required": ["fieldRef"]}},
{"not": {"required": ["resourceFieldRef"]}},
{"not": {"required": ["secretKeyRef"]}}
]
}
}
},
"valueFromItem": {
"oneOf": [
{"$ref": "#/valueFromItemExplicit"},
{"$ref": "#/valueFromItemImplicit"}
]
},
"valueFromItemExplicit": {
"type": "object",
"additionalProperties": false,
"properties": {
"valueFrom": {"$ref": "#/valueFromOptions"},
"dependsOn": {"$ref": "#/envVarDependsOn"}
},
"required": ["valueFrom"]
},
"valueFromItemImplicit": {
"type": "object",
"additionalProperties": false,
"properties": {
"fieldRef": {"$ref": "#/fieldRefSelector"},
"resourceFieldRef": {"$ref": "#/resourceFieldRefSelector"},
"secretKeyRef": {"$ref": "#/objectKeySelector"},
"configMapKeyRef": {"$ref": "#/objectKeySelector"},
"dependsOn": {"$ref": "#/envVarDependsOn"}
},
"dependencies": {
"fieldRef": {
"allOf": [
{"not": {"required": ["resourceFieldRef"]}},
{"not": {"required": ["secretKeyRef"]}},
{"not": {"required": ["configMapKeyRef"]}}
]
},
"resourceFieldRef": {
"allOf": [
{"not": {"required": ["fieldRef"]}},
{"not": {"required": ["secretKeyRef"]}},
{"not": {"required": ["configMapKeyRef"]}}
]
},
"secretKeyRef": {
"allOf": [
{"not": {"required": ["fieldRef"]}},
{"not": {"required": ["resourceFieldRef"]}},
{"not": {"required": ["configMapKeyRef"]}}
]
},
"configMapKeyRef": {
"allOf": [
{"not": {"required": ["fieldRef"]}},
{"not": {"required": ["resourceFieldRef"]}},
{"not": {"required": ["secretKeyRef"]}}
]
}
}
},
"valueFromOptions": {
"type": "object",
"oneOf": [
{"$ref": "#/fieldRef"},
{"$ref": "#/resourceFieldRef"},
{"$ref": "#/secretKeyRef"},
{"$ref": "#/configMapKeyRef"}
]
},
"secretKeyRef": {
"type": "object",
"additionalProperties": false,
"properties": {
"secretKeyRef": {"$ref": "#/objectKeySelector"}
},
"required": ["secretKeyRef"]
},
"configMapKeyRef": {
"type": "object",
"additionalProperties": false,
"properties": {
"configMapKeyRef": {"$ref": "#/objectKeySelector"}
},
"required": ["configMapKeyRef"]
},
"fieldRef": {
"type": "object",
"additionalProperties": false,
"properties": {
"fieldRef": {"$ref": "#/fieldRefSelector"}
},
"required": ["fieldRef"]
},
"fieldRefSelector": {
"type": "object",
"additionalProperties": false,
"properties": {
"apiVersion": {
"type": "string"
},
"fieldPath": {
"type": "string"
}
},
"required": ["fieldPath"]
},
"resourceFieldRef": {
"type": "object",
"additionalProperties": false,
"properties": {
"resourceFieldRef": {"$ref": "#/resourceFieldRefSelector"}
},
"required": ["resourceFieldRef"]
},
"resourceFieldRefSelector": {
"type": "object",
"additionalProperties": false,
"properties": {
"containerName": {
"type": "string"
},
"divisor": {
"oneOf": [{"type": "string"}, {"type": "number"}]
},
"resource": {
"type": "string"
}
},
"required": ["resource"]
},
"envVarDependsOn": {
"oneOf": [
{"type": "string"},
{
"type": "array",
"items": {"type": "string"}
}
]
},
"objectKeySelector": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
}
},
"required": ["name", "key"]
}
}

View file

@ -18,7 +18,9 @@ Return the primary port for a given Service object.
{{- /* Return the first port if none has been explicitly marked as primary */ -}} {{- /* Return the first port if none has been explicitly marked as primary */ -}}
{{- if not $result -}} {{- if not $result -}}
{{- $firstPortKey := keys $enabledPorts | first -}} {{- $firstPortKey := keys $enabledPorts | first -}}
{{- $result = get $enabledPorts $firstPortKey -}} {{- if $firstPortKey -}}
{{- $result = get $enabledPorts $firstPortKey -}}
{{- end -}}
{{- end -}} {{- end -}}
{{- $result | toYaml -}} {{- $result | toYaml -}}

View file

@ -1,6 +1,6 @@
{ {
"$schema": "http://json-schema.org/draft-07/schema", "$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.0.3/charts/library/common/values.schema.json", "$id": "https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.0.4/charts/library/common/values.schema.json",
"type": "object", "type": "object",
"properties": { "properties": {