feat: Release common version 1.4.0 (#130)

* fix(common):: Fix Integer style image tags (fixes #128)
* feat(common): Reload pod on secret change (#129)
* feat(common): Update code-server to v4.11.0
* fix(common): quote command and args strings (#124)
* feat(common): Update gluetun to v3.33.0

---------

Signed-off-by: angelnu <git@angelnu.com>
Signed-off-by: Maurits van Mastrigt <maurits@funda.nl>
Co-authored-by: Angel Nunez Mencias <github@angelnu.com>
Co-authored-by: Maurits <75321636+maurits-funda@users.noreply.github.com>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2023-04-12 19:30:47 +02:00 committed by GitHub
parent 3ea1337d83
commit 923ef40a39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 297 additions and 115 deletions

View file

@ -1,5 +1,5 @@
chart-yaml-schema: .ci/ct/chart_schema.yaml chart-yaml-schema: .ci/ct/chart_schema.yaml
lint-conf: .ci/ct/lintconf.yaml lint-conf: .yamllint.yml
remote: origin remote: origin
target-branch: main target-branch: main

15
.editorconfig Normal file
View file

@ -0,0 +1,15 @@
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{sh,json}]
indent_size = 4
[*.md]
max_line_length = off
trim_trailing_whitespace = true

View file

@ -8,7 +8,7 @@ on:
type: string type: string
isRenovatePR: isRenovatePR:
required: true required: true
default: 'false' default: "false"
type: string type: string
chartsToLint: chartsToLint:
description: > description: >
@ -20,10 +20,10 @@ on:
A JSON encoded array of dependencies to override before linting A JSON encoded array of dependencies to override before linting
type: string type: string
required: false required: false
default: '[]' default: "[]"
env: env:
HELM_VERSION: 3.9.2 HELM_VERSION: 3.11.2
jobs: jobs:
lint-chart: lint-chart:

View file

@ -17,7 +17,7 @@ on:
required: true required: true
env: env:
HELM_VERSION: 3.11.1 HELM_VERSION: 3.11.2
jobs: jobs:
release-charts: release-charts:
@ -83,7 +83,7 @@ jobs:
commit_user_name: "bjw-s-bot[bot]" commit_user_name: "bjw-s-bot[bot]"
commit_user_email: 87358111+bjw-s-bot[bot]@users.noreply.github.com commit_user_email: 87358111+bjw-s-bot[bot]@users.noreply.github.com
commit_author: bjw-s-bot[bot] <87358111+bjw-s-bot[bot]@users.noreply.github.com> commit_author: bjw-s-bot[bot] <87358111+bjw-s-bot[bot]@users.noreply.github.com>
file_pattern: 'index.yaml **/*.tgz' file_pattern: "index.yaml **/*.tgz"
disable_globbing: true disable_globbing: true
- name: Wait for deploy - name: Wait for deploy

View file

@ -17,7 +17,7 @@ on:
required: true required: true
env: env:
HELM_VERSION: 3.11.1 HELM_VERSION: 3.11.2
CHARTS_SRC_DIR: "charts" CHARTS_SRC_DIR: "charts"
TARGET_REGISTRY: ghcr.io TARGET_REGISTRY: ghcr.io

View file

@ -19,7 +19,7 @@ on:
- "charts/**" - "charts/**"
env: env:
HELM_VERSION: 3.11.1 HELM_VERSION: 3.11.2
jobs: jobs:
prepare: prepare:

View file

@ -16,10 +16,10 @@ on:
A JSON encoded array of dependencies to override before testing A JSON encoded array of dependencies to override before testing
type: string type: string
required: false required: false
default: '[]' default: "[]"
env: env:
HELM_VERSION: 3.9.2 HELM_VERSION: 3.11.2
jobs: jobs:
install-chart: install-chart:
@ -49,7 +49,7 @@ jobs:
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: "3.10" python-version: "3.11"
- name: Set up chart-testing - name: Set up chart-testing
uses: helm/chart-testing-action@v2.4.0 uses: helm/chart-testing-action@v2.4.0

View file

@ -19,9 +19,9 @@ rules:
max-spaces-after: 1 max-spaces-after: 1
comments: comments:
require-starting-space: true require-starting-space: true
min-spaces-from-content: 2 min-spaces-from-content: 1
document-end: disable document-end: disable
document-start: disable # No --- to start a file document-start: disable # No --- to start a file
empty-lines: empty-lines:
max: 2 max: 2
max-start: 0 max-start: 0
@ -30,10 +30,10 @@ rules:
max-spaces-after: 1 max-spaces-after: 1
indentation: indentation:
spaces: consistent spaces: consistent
indent-sequences: whatever # - list indentation will handle both indentation and without indent-sequences: whatever # - list indentation will handle both indentation and without
check-multi-line-strings: false check-multi-line-strings: false
key-duplicates: enable key-duplicates: enable
line-length: disable # Lines can be any length line-length: disable # Lines can be any length
new-line-at-end-of-file: enable new-line-at-end-of-file: enable
new-lines: new-lines:
type: unix type: unix

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: 1.3.2 version: 1.4.0
kubeVersion: ">=1.22.0-0" kubeVersion: ">=1.22.0-0"
keywords: keywords:
- common - common
@ -14,9 +14,16 @@ maintainers:
email: me@bjw-s.dev email: me@bjw-s.dev
annotations: annotations:
artifacthub.io/changes: |- artifacthub.io/changes: |-
- kind: added
description: Reload Pod when secrets change
- kind: changed - kind: changed
description: Updated code-server image tag to v4.10.0 description: Quoting command and args strings to support multiline arguments
- kind: changed - kind: changed
description: Updated netshoot image tag to v0.9 description: Updated code-server image tag to v4.11.0
- kind: changed
description: Updated gluetun image tag to v3.33.0
- kind: fixed - kind: fixed
description: Pod annotations were not indented enough when controller type was cronjob description: Integer style image tags now render correctly
links:
- name: GitHub Issue
url: https://github.com/bjw-s/helm-charts/issues/128

View file

@ -0,0 +1,15 @@
{{/*
Image used by the main container.
*/}}
{{- define "bjw-s.common.lib.container.image" -}}
{{- $imageRepo := .Values.image.repository -}}
{{- $imageTag := default .Chart.AppVersion .Values.image.tag -}}
{{- if kindIs "float64" .Values.image.tag -}}
{{- $imageTag = .Values.image.tag | toString -}}
{{- end -}}
{{- if and $imageRepo $imageTag -}}
{{- printf "%s:%s" $imageRepo $imageTag -}}
{{- end -}}
{{- end -}}

View file

@ -1,12 +1,12 @@
{{- /* The main container included in the controller */ -}} {{- /* The main container included in the controller */ -}}
{{- define "bjw-s.common.lib.controller.mainContainer" -}} {{- define "bjw-s.common.lib.controller.mainContainer" -}}
- name: {{ include "bjw-s.common.lib.chart.names.fullname" . }} - name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
image: {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) | quote }} image: {{ include "bjw-s.common.lib.container.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.command }} {{- with .Values.command }}
command: command:
{{- if kindIs "string" . }} {{- if kindIs "string" . }}
- {{ . }} - {{ . | quote }}
{{- else }} {{- else }}
{{ toYaml . | nindent 4 }} {{ toYaml . | nindent 4 }}
{{- end }} {{- end }}
@ -14,7 +14,7 @@
{{- with .Values.args }} {{- with .Values.args }}
args: args:
{{- if kindIs "string" . }} {{- if kindIs "string" . }}
- {{ . }} - {{ . | quote }}
{{- else }} {{- else }}
{{ toYaml . | nindent 4 }} {{ toYaml . | nindent 4 }}
{{- end }} {{- end }}

View file

@ -13,4 +13,14 @@
{{- if $configMapsFound -}} {{- if $configMapsFound -}}
{{- printf "checksum/config: %v" (toYaml $configMapsFound | sha256sum) | nindent 0 -}} {{- printf "checksum/config: %v" (toYaml $configMapsFound | sha256sum) | nindent 0 -}}
{{- end -}} {{- end -}}
{{- $secretsFound := dict -}}
{{- range $name, $secret := .Values.secrets -}}
{{- if $secret.enabled -}}
{{- $_ := set $secretsFound $name (toYaml $secret.data | sha256sum) -}}
{{- end -}}
{{- end -}}
{{- if $secretsFound -}}
{{- printf "checksum/secrets: %v" (toYaml $secretsFound | sha256sum) | nindent 0 -}}
{{- end -}}
{{- end -}} {{- end -}}

View file

@ -1,3 +1,4 @@
---
global: global:
# -- Set an override for the prefix of the fullname # -- Set an override for the prefix of the fullname
nameOverride: nameOverride:
@ -42,7 +43,8 @@ controller:
# -- CronJob configuration. Required only when using `controller.type: cronjob`. # -- CronJob configuration. Required only when using `controller.type: cronjob`.
# @default -- See below # @default -- See below
cronjob: cronjob:
# -- Specifies how to treat concurrent executions of a job that is created by this cron job, valid values are Allow, Forbid or Replace # -- Specifies how to treat concurrent executions of a job that is created by this cron job
# valid values are Allow, Forbid or Replace
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
# -- Sets the CronJob time when to execute your jobs # -- Sets the CronJob time when to execute your jobs
schedule: "*/20 * * * *" schedule: "*/20 * * * *"
@ -52,7 +54,8 @@ controller:
successfulJobsHistory: 1 successfulJobsHistory: 1
# -- The number of failed Jobs to keep # -- The number of failed Jobs to keep
failedJobsHistory: 1 failedJobsHistory: 1
# -- If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. # -- If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to
# be automatically deleted.
ttlSecondsAfterFinished: ttlSecondsAfterFinished:
image: image:
@ -105,7 +108,8 @@ secrets:
# -- Annotations to add to the Secret # -- Annotations to add to the Secret
annotations: {} annotations: {}
# -- Secret stringData content. Helm template enabled. # -- Secret stringData content. Helm template enabled.
stringData: {} stringData:
{}
# foo: bar # foo: bar
# -- Configure configMaps for the chart here. # -- Configure configMaps for the chart here.
@ -120,7 +124,8 @@ configMaps:
# -- Annotations to add to the configMap # -- Annotations to add to the configMap
annotations: {} annotations: {}
# -- configMap data content. Helm template enabled. # -- configMap data content. Helm template enabled.
data: {} data:
{}
# foo: bar # foo: bar
# -- Main environment variables. Template enabled. # -- Main environment variables. Template enabled.
@ -152,13 +157,13 @@ envFrom: []
# name: secret-name # name: secret-name
# -- Custom priority class for different treatment by the scheduler # -- Custom priority class for different treatment by the scheduler
priorityClassName: # system-node-critical priorityClassName: # system-node-critical
# -- Allow specifying a runtimeClassName other than the default one (ie: nvidia) # -- Allow specifying a runtimeClassName other than the default one (ie: nvidia)
runtimeClassName: # nvidia runtimeClassName: # nvidia
# -- Allows specifying a custom scheduler name # -- Allows specifying a custom scheduler name
schedulerName: # awkward-dangerous-scheduler schedulerName: # awkward-dangerous-scheduler
# -- Allows specifying explicit hostname setting # -- Allows specifying explicit hostname setting
hostname: hostname:
@ -166,10 +171,11 @@ hostname:
# -- When using hostNetwork make sure you set dnsPolicy to `ClusterFirstWithHostNet` # -- When using hostNetwork make sure you set dnsPolicy to `ClusterFirstWithHostNet`
hostNetwork: false hostNetwork: false
# -- Defaults to "ClusterFirst" if hostNetwork is false and "ClusterFirstWithHostNet" if hostNetwork is true. # -- Defaults to "ClusterFirst" if hostNetwork is false
dnsPolicy: # ClusterFirst # and "ClusterFirstWithHostNet" if hostNetwork is true.
dnsPolicy: # ClusterFirst
# -- Optional DNS settings, configuring the ndots option may resolve nslookup issues on some Kubernetes setups. # -- Configuring the ndots option may resolve nslookup issues on some Kubernetes setups.
dnsConfig: {} dnsConfig: {}
# options: # options:
# - name: ndots # - name: ndots
@ -188,11 +194,13 @@ securityContext: {}
# -- Configure the lifecycle for the main container # -- Configure the lifecycle for the main container
lifecycle: {} lifecycle: {}
# -- Specify any initContainers here as dictionary items. Each initContainer should have its own key. # -- Specify any initContainers here as dictionary items.
# The dictionary item key will determine the order. Helm templates can be used. # Each initContainer should have its own key. The dictionary item key will determine the order.
# Helm templates can be used.
initContainers: {} initContainers: {}
# -- Specify any sidecar containers here as dictionary items. Each sidecar container should have its own key. # -- Specify any sidecar containers here as dictionary items.
# Each sidecar container should have its own key. The dictionary item key will determine the order.
# Helm templates can be used. # Helm templates can be used.
sidecars: {} sidecars: {}
@ -387,7 +395,8 @@ ingress:
nameOverride: nameOverride:
# -- Provide additional annotations which may be required. # -- Provide additional annotations which may be required.
annotations: {} annotations:
{}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
@ -395,15 +404,15 @@ ingress:
labels: {} labels: {}
# -- Set the ingressClass that is used for this ingress. # -- Set the ingressClass that is used for this ingress.
ingressClassName: # "nginx" ingressClassName: # "nginx"
## Configure the hosts for the ingress ## Configure the hosts for the ingress
hosts: hosts:
- # -- Host address. Helm template can be passed. - # -- Host address. Helm template can be passed.
host: chart-example.local host: chart-example.local
## Configure the paths for the host ## Configure the paths for the host
paths: paths:
- # -- Path. Helm template can be passed. - # -- Path. Helm template can be passed.
path: / path: /
pathType: Prefix pathType: Prefix
service: service:
@ -442,30 +451,30 @@ route:
# -- Configure the resource the route attaches to. # -- Configure the resource the route attaches to.
parentRefs: parentRefs:
- # Group of the referent resource. - # Group of the referent resource.
group: gateway.networking.k8s.io group: gateway.networking.k8s.io
# Kind of the referent resource. # Kind of the referent resource.
kind: Gateway kind: Gateway
# Name of the referent resource # Name of the referent resource
name: name:
# Namespace of the referent resource # Namespace of the referent resource
namespace: namespace:
# Name of the section within the target resource. # Name of the section within the target resource.
sectionName: sectionName:
# -- Host addresses # -- Host addresses
hostnames: [] hostnames: []
# -- Configure rules for routing. Defaults to the primary service. # -- Configure rules for routing. Defaults to the primary service.
rules: rules:
- # -- Configure backends where matching requests should be sent. - # -- Configure backends where matching requests should be sent.
backendRefs: backendRefs:
- group: "" - group: ""
kind: Service kind: Service
name: name:
namespace: namespace:
port: port:
weight: 1 weight: 1
## Configure conditions used for matching incoming requests. Only for HTTPRoutes ## Configure conditions used for matching incoming requests. Only for HTTPRoutes
matches: matches:
- path: - path:
@ -490,7 +499,7 @@ persistence:
# -- Where to mount the volume in the main container. # -- Where to mount the volume in the main container.
# Defaults to `/<name_of_the_volume>`, # Defaults to `/<name_of_the_volume>`,
# setting to '-' creates the volume but disables the volumeMount. # setting to '-' creates the volume but disables the volumeMount.
mountPath: # /config mountPath: # /config
# -- Specify if the volume should be mounted read-only. # -- Specify if the volume should be mounted read-only.
readOnly: false readOnly: false
# -- Override the name suffix that is used for this volume. # -- Override the name suffix that is used for this volume.
@ -500,13 +509,13 @@ persistence:
# If set to `-`, dynamic provisioning is disabled. # If set to `-`, dynamic provisioning is disabled.
# If set to something else, the given storageClass is used. # If set to something else, the given storageClass is used.
# If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. # If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner.
storageClass: # "-" storageClass: # "-"
# -- If you want to reuse an existing claim, the name of the existing PVC can be passed here. # -- If you want to reuse an existing claim, the name of the existing PVC can be passed here.
existingClaim: # your-claim existingClaim: # your-claim
# -- Used in conjunction with `existingClaim`. Specifies a sub-path inside the referenced volume instead of its root # -- Used in conjunction with `existingClaim`. Specifies a sub-path inside the referenced volume instead of its root
subPath: # some-subpath subPath: # some-subpath
# -- AccessMode for the persistent volume. # -- AccessMode for the persistent volume.
# Make sure to select an access mode that is supported by your storage provider! # Make sure to select an access mode that is supported by your storage provider!
@ -529,11 +538,11 @@ persistence:
# -- Set the medium to "Memory" to mount a tmpfs (RAM-backed filesystem) instead # -- Set the medium to "Memory" to mount a tmpfs (RAM-backed filesystem) instead
# of the storage medium that backs the node. # of the storage medium that backs the node.
medium: # Memory medium: # Memory
# -- If the `SizeMemoryBackedVolumes` feature gate is enabled, you can # -- If the `SizeMemoryBackedVolumes` feature gate is enabled, you can
# specify a size for memory backed volumes. # specify a size for memory backed volumes.
sizeLimit: # 1Gi sizeLimit: # 1Gi
# -- Used in conjunction with `controller.type: statefulset` to create individual disks for each instance. # -- Used in conjunction with `controller.type: statefulset` to create individual disks for each instance.
volumeClaimTemplates: [] volumeClaimTemplates: []
@ -581,7 +590,8 @@ hostAliases: []
# - "www.example.com" # - "www.example.com"
# -- Set the resource requests / limits for the main container. # -- Set the resource requests / limits for the main container.
resources: {} resources:
{}
## We usually recommend not to specify default resources and to leave this as a conscious ## We usually recommend not to specify default resources and to leave this as a conscious
## choice for the user. This also increases chances charts run on environments with little ## choice for the user. This also increases chances charts run on environments with little
## resources, such as Minikube. If you do want to specify resources, uncomment the following ## resources, such as Minikube. If you do want to specify resources, uncomment the following
@ -596,7 +606,6 @@ resources: {}
# -- The common chart supports several add-ons. These can be configured under this key. # -- The common chart supports several add-ons. These can be configured under this key.
# @default -- See below # @default -- See below
addons: addons:
# -- The common chart supports adding a VPN add-on. It can be configured under this key. # -- The common chart supports adding a VPN add-on. It can be configured under this key.
# @default -- See values.yaml # @default -- See values.yaml
vpn: vpn:
@ -607,14 +616,15 @@ addons:
type: gluetun type: gluetun
# -- Gluetun specific configuration # -- Gluetun specific configuration
# -- Make sure to read the [documentation](https://github.com/qdm12/gluetun/wiki) to see how to configure this addon! # -- Make sure to read the [documentation](https://github.com/qdm12/gluetun/wiki)
# to see how to configure this addon!
# @default -- See below # @default -- See below
gluetun: gluetun:
image: image:
# -- Specify the Gluetun image # -- Specify the Gluetun image
repository: docker.io/qmcgaw/gluetun repository: docker.io/qmcgaw/gluetun
# -- Specify the Gluetun image tag # -- Specify the Gluetun image tag
tag: v3.32.0 tag: v3.33.0
# -- Specify the Gluetun image pull policy # -- Specify the Gluetun image pull policy
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
@ -628,14 +638,16 @@ addons:
# -- All variables specified here will be added to the vpn sidecar container # -- All variables specified here will be added to the vpn sidecar container
# See the documentation of the VPN image for all config values # See the documentation of the VPN image for all config values
env: {} env:
{}
# TZ: UTC # TZ: UTC
# -- Override the args for the vpn sidecar container # -- Override the args for the vpn sidecar container
args: [] args: []
# -- Provide a customized vpn configuration file to be used by the VPN. # -- Provide a customized vpn configuration file to be used by the VPN.
configFile: # |- configFile:
# |-
# Some Example Config # Some Example Config
# remote greatvpnhost.com 8888 # remote greatvpnhost.com 8888
# auth-user-pass # auth-user-pass
@ -649,12 +661,14 @@ addons:
# @default -- See values.yaml # @default -- See values.yaml
scripts: scripts:
# @default -- See below # @default -- See below
up: # |- up:
# #!/bin/bash # |-
# echo "connected" > /shared/vpnstatus # !/bin/bash
# echo "connected" > /shared/vpnstatus
# @default -- See below # @default -- See below
down: # |- down:
# |-
# #!/bin/bash # #!/bin/bash
# echo "disconnected" > /shared/vpnstatus # echo "disconnected" > /shared/vpnstatus
@ -662,7 +676,8 @@ addons:
# -- Optionally specify a livenessProbe, e.g. to check if the connection is still # -- Optionally specify a livenessProbe, e.g. to check if the connection is still
# being protected by the VPN # being protected by the VPN
livenessProbe: {} livenessProbe:
{}
# exec: # exec:
# command: # command:
# - sh # - sh
@ -701,7 +716,6 @@ addons:
# protocol: TCP # protocol: TCP
# -- The common library supports adding a code-server add-on to access files. It can be configured under this key. # -- The common library supports adding a code-server add-on to access files. It can be configured under this key.
# For more info, check out [our docs](https://bjw-s.github.io/helm-charts/docs/common-library/common-library-add-ons/##code-server)
# @default -- See values.yaml # @default -- See values.yaml
codeserver: codeserver:
# -- Enable running a code-server container in the pod # -- Enable running a code-server container in the pod
@ -711,12 +725,13 @@ addons:
# -- Specify the code-server image # -- Specify the code-server image
repository: ghcr.io/coder/code-server repository: ghcr.io/coder/code-server
# -- Specify the code-server image tag # -- Specify the code-server image tag
tag: 4.10.0 tag: 4.11.0
# -- Specify the code-server image pull policy # -- Specify the code-server image pull policy
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# -- Set any environment variables for code-server here # -- Set any environment variables for code-server here
env: {} env:
{}
# TZ: UTC # TZ: UTC
# -- Set codeserver command line arguments. # -- Set codeserver command line arguments.
@ -770,14 +785,15 @@ addons:
# -- Enable an ingress for the code-server add-on. # -- Enable an ingress for the code-server add-on.
enabled: false enabled: false
annotations: {} annotations:
{}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
labels: {} labels: {}
# -- Set the ingressClass that is used for this ingress. # -- Set the ingressClass that is used for this ingress.
ingressClassName: # "nginx" ingressClassName: # "nginx"
hosts: hosts:
- host: code.chart-example.local - host: code.chart-example.local
@ -792,7 +808,8 @@ addons:
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
# -- The common library supports adding a netshoot add-on to troubleshoot network issues within a Pod. It can be configured under this key. # -- The common library supports adding a netshoot add-on to troubleshoot network issues within a Pod.
# It can be configured under this key.
# @default -- See values.yaml # @default -- See values.yaml
netshoot: netshoot:
# -- Enable running a netshoot container in the pod # -- Enable running a netshoot container in the pod

View file

@ -2,7 +2,7 @@
apiVersion: v2 apiVersion: v2
description: A common powered chart template. This can be useful for small projects that don't have their own chart. description: A common powered chart template. This can be useful for small projects that don't have their own chart.
name: app-template name: app-template
version: 1.3.2 version: 1.4.0
kubeVersion: ">=1.22.0-0" kubeVersion: ">=1.22.0-0"
maintainers: maintainers:
- name: bjw-s - name: bjw-s
@ -10,12 +10,12 @@ maintainers:
dependencies: dependencies:
- name: common - name: common
repository: https://bjw-s.github.io/helm-charts repository: https://bjw-s.github.io/helm-charts
version: 1.3.2 version: 1.4.0
annotations: annotations:
artifacthub.io/changes: |- artifacthub.io/changes: |-
- kind: changed - kind: changed
description: | description: |
Updated library version to 1.3.2. Updated library version to 1.4.0.
links: links:
- name: Common library chart definition - name: Common library chart definition
url: https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/Chart.yaml url: https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/Chart.yaml

View file

@ -23,7 +23,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: custom metadata should pass - it: custom metadata should pass
set: set:
@ -52,7 +52,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom metadata with global metadata should pass - it: custom metadata with global metadata should pass
@ -89,5 +89,5 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
global_label: test global_label: test
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test

View file

@ -24,11 +24,42 @@ tests:
value: value:
- sleep infinity - sleep infinity
- it: multiline string should pass
set:
args: |
echo hello
echo world
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].args
value:
- |
echo hello
echo world
- it: single quoted string should pass
set:
args: "sleep infinity"
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].args
value:
- sleep infinity
- it: list of strings should pass - it: list of strings should pass
set: set:
args: args:
- sleep - sleep
- infinity - infinity
- "test"
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
isKind: isKind:
@ -39,3 +70,4 @@ tests:
value: value:
- sleep - sleep
- infinity - infinity
- test

View file

@ -24,11 +24,41 @@ tests:
value: value:
- /bin/sh - /bin/sh
- it: multiline string should pass
set:
command: |
/bin/sh
-c
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].command
value:
- |
/bin/sh
-c
- it: single quoted string should pass
set:
command: "/bin/sh"
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].command
value:
- /bin/sh
- it: list of strings should pass - it: list of strings should pass
set: set:
command: command:
- /bin/sh - /bin/sh
- -c - "-c"
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
isKind: isKind:

View file

@ -0,0 +1,31 @@
suite: container image tag
templates:
- common.yaml
tests:
- it: string tag should pass
set:
image:
repository: b4bz/homer
tag: latest
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].image
value: b4bz/homer:latest
- it: integer tag should pass
set:
image:
repository: b4bz/homer
tag: 1.23
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].image
value: b4bz/homer:1.23

View file

@ -19,7 +19,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: custom metadata should pass - it: custom metadata should pass
set: set:
@ -45,7 +45,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom metadata with global metadata should pass - it: custom metadata with global metadata should pass
@ -79,7 +79,7 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
global_label: test global_label: test
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: jobTemplate metadata should pass - it: jobTemplate metadata should pass

View file

@ -19,7 +19,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: custom metadata should pass - it: custom metadata should pass
set: set:
@ -45,7 +45,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom metadata with global metadata should pass - it: custom metadata with global metadata should pass
@ -79,5 +79,5 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
global_label: test global_label: test
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test

View file

@ -19,7 +19,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: custom metadata should pass - it: custom metadata should pass
set: set:
@ -45,7 +45,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom metadata with global metadata should pass - it: custom metadata with global metadata should pass
@ -79,5 +79,5 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
global_label: test global_label: test
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test

View file

@ -19,7 +19,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: custom metadata should pass - it: custom metadata should pass
set: set:
@ -45,7 +45,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom metadata with global metadata should pass - it: custom metadata with global metadata should pass
@ -79,5 +79,5 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
global_label: test global_label: test
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test

View file

@ -19,7 +19,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: custom metadata should pass - it: custom metadata should pass
set: set:
@ -45,7 +45,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom metadata with global metadata should pass - it: custom metadata with global metadata should pass
@ -79,5 +79,5 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
global_label: test global_label: test
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test

View file

@ -19,7 +19,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: retain enabled should pass - it: retain enabled should pass
set: set:
@ -42,7 +42,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: custom metadata should pass - it: custom metadata should pass
set: set:
@ -68,7 +68,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom metadata with global metadata should pass - it: custom metadata with global metadata should pass
@ -102,5 +102,5 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
global_label: test global_label: test
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test

View file

@ -23,7 +23,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: custom metadata should pass - it: custom metadata should pass
set: set:
@ -52,7 +52,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom metadata with global metadata should pass - it: custom metadata with global metadata should pass
@ -89,5 +89,5 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
global_label: test global_label: test
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test

View file

@ -23,7 +23,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: custom metadata should pass - it: custom metadata should pass
set: set:
@ -52,7 +52,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom metadata with global metadata should pass - it: custom metadata with global metadata should pass
@ -89,7 +89,7 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
global_label: test global_label: test
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom secret type should pass - it: custom secret type should pass

View file

@ -0,0 +1,25 @@
suite: secret Pod metadata
templates:
- common.yaml
tests:
- it: default metadata should pass
set:
secrets:
secret_1:
enabled: true
data:
test: value 1
secret_2:
enabled: true
data:
test_1: value 1
test_2: value 2
asserts:
- documentIndex: &ControllerDoc 0
isKind:
of: Deployment
- documentIndex: *ControllerDoc
equal:
path: spec.template.metadata.annotations
value:
checksum/secrets: cd4e5076088172611ca1c43c659a275232d9eeb887acc20575ac141038b9aacb

View file

@ -18,7 +18,7 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
app.kubernetes.io/service: RELEASE-NAME app.kubernetes.io/service: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
- it: custom metadata should pass - it: custom metadata should pass
set: set:
@ -45,7 +45,7 @@ tests:
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
app.kubernetes.io/service: RELEASE-NAME app.kubernetes.io/service: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test
- it: custom metadata with global metadata should pass - it: custom metadata with global metadata should pass
@ -80,5 +80,5 @@ tests:
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
app.kubernetes.io/service: RELEASE-NAME app.kubernetes.io/service: RELEASE-NAME
global_label: test global_label: test
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test_label: test test_label: test

View file

@ -74,7 +74,7 @@ tests:
app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.3.2 helm.sh/chart: app-template-1.4.0
test.label: testvalue test.label: testvalue
- it: a serviceMonitor is created with nameOverride - it: a serviceMonitor is created with nameOverride