mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37:04 +02:00
feat(common): Release common library 3.6.0 (#364)
Signed-off-by: solidDoWant <fred.heinecke@yahoo.com> Co-authored-by: solidDoWant <fred.heinecke@yahoo.com>
This commit is contained in:
parent
6d23aa66ca
commit
e68b41ed0a
11 changed files with 240 additions and 9 deletions
|
@ -3,7 +3,7 @@ apiVersion: v2
|
|||
name: common
|
||||
description: Function library for Helm charts
|
||||
type: library
|
||||
version: 3.5.1
|
||||
version: 3.6.0
|
||||
kubeVersion: ">=1.22.0-0"
|
||||
keywords:
|
||||
- common
|
||||
|
@ -16,4 +16,7 @@ annotations:
|
|||
artifacthub.io/changes: |-
|
||||
- kind: added
|
||||
description: |-
|
||||
Add feature flag to override enforcing the creation of a default ServiceAccount
|
||||
Add hostUsers field to pod spec for k8s clusters >= 1.29
|
||||
- kind: added
|
||||
description: |-
|
||||
Allow propagating global labels and annotations to Pod metadata
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# common
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
Function library for Helm charts
|
||||
|
||||
|
@ -27,7 +27,7 @@ Include this chart as a dependency in your `Chart.yaml` e.g.
|
|||
# Chart.yaml
|
||||
dependencies:
|
||||
- name: common
|
||||
version: 3.5.1
|
||||
version: 3.6.0
|
||||
repository: https://bjw-s.github.io/helm-charts/
|
||||
```
|
||||
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"hostUsers": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"hostname": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
@ -27,6 +27,9 @@ hostname: {{ . | trim }}
|
|||
hostIPC: {{ include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "hostIPC" "default" false) }}
|
||||
hostNetwork: {{ include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "hostNetwork" "default" false) }}
|
||||
hostPID: {{ include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "hostPID" "default" false) }}
|
||||
{{- if ge ($rootContext.Capabilities.KubeVersion.Minor | int) 29 }}
|
||||
hostUsers: {{ include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "hostUsers" "default" true) }}
|
||||
{{- end }}
|
||||
dnsPolicy: {{ include "bjw-s.common.lib.pod.field.dnsPolicy" (dict "ctx" $ctx) | trim }}
|
||||
{{- with (include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "dnsConfig")) }}
|
||||
dnsConfig: {{ . | nindent 2 }}
|
||||
|
|
|
@ -6,7 +6,17 @@ Returns the value for annotations
|
|||
{{- $controllerObject := .controllerObject -}}
|
||||
|
||||
{{- /* Default annotations */ -}}
|
||||
{{- $annotations := dict -}}
|
||||
{{- $annotations := merge
|
||||
(dict)
|
||||
-}}
|
||||
|
||||
{{- /* Include global annotations if specified */ -}}
|
||||
{{- if $rootContext.Values.global.propagateGlobalMetadataToPods -}}
|
||||
{{- $annotations = merge
|
||||
(include "bjw-s.common.lib.metadata.globalAnnotations" $rootContext | fromYaml)
|
||||
$annotations
|
||||
-}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Set to the default if it is set */ -}}
|
||||
{{- $defaultOption := get (default dict $rootContext.Values.defaultPodOptions) "annotations" -}}
|
||||
|
|
|
@ -10,6 +10,14 @@ Returns the value for labels
|
|||
(dict "app.kubernetes.io/component" $controllerObject.identifier)
|
||||
-}}
|
||||
|
||||
{{- /* Include global labels if specified */ -}}
|
||||
{{- if $rootContext.Values.global.propagateGlobalMetadataToPods -}}
|
||||
{{- $labels = merge
|
||||
(include "bjw-s.common.lib.metadata.globalLabels" $rootContext | fromYaml)
|
||||
$labels
|
||||
-}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Fetch the Pod selectorLabels */ -}}
|
||||
{{- $selectorLabels := include "bjw-s.common.lib.metadata.selectorLabels" $rootContext | fromYaml -}}
|
||||
{{- if not (empty $selectorLabels) -}}
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.5.1/charts/library/common/values.schema.json",
|
||||
"$id": "https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.6.0/charts/library/common/values.schema.json",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"global": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"annotations": {
|
||||
"$ref": "schemas/definitions.json#/annotations"
|
||||
},
|
||||
"nameOverride": {
|
||||
"type": [
|
||||
"string",
|
||||
|
@ -21,8 +18,15 @@
|
|||
"null"
|
||||
]
|
||||
},
|
||||
"propagateGlobalMetadataToPods": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"labels": {
|
||||
"$ref": "schemas/definitions.json#/labels"
|
||||
},
|
||||
"annotations": {
|
||||
"$ref": "schemas/definitions.json#/annotations"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,6 +4,8 @@ global:
|
|||
nameOverride:
|
||||
# -- Set the entire name definition
|
||||
fullnameOverride:
|
||||
# -- Propagate global metadata to Pod labels.
|
||||
propagateGlobalMetadataToPods: false
|
||||
# -- Set additional global labels. Helm templates can be used.
|
||||
labels: {}
|
||||
# -- Set additional global annotations. Helm templates can be used.
|
||||
|
@ -48,6 +50,9 @@ defaultPodOptions:
|
|||
# -- Use the host's pid namespace
|
||||
hostPID: false
|
||||
|
||||
# -- Use the host's user namespace (requires 1.29 or newer)
|
||||
hostUsers: true
|
||||
|
||||
# -- Set image pull secrets
|
||||
imagePullSecrets: []
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue