Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions charts/common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: common
description: "Bedag's common Helm chart to use for creating other Helm charts"
version: 12.8.0
version: 12.9.0
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
Expand All @@ -27,4 +27,8 @@ annotations:
artifacthub.io/prerelease: "false"
artifacthub.io/license: Apache-2.0
artifacthub.io/changes: |
- "[Added]: Support image digest in container image reference"
- kind: added
description: StatefulSet serviceName now matches the governing Service name via optional controller.serviceName
links:
- name: GitHub Issue
url: https://github.com/bedag/helm-charts/issues/185
2 changes: 1 addition & 1 deletion charts/common/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# common

![Version: 12.8.0](https://img.shields.io/badge/Version-12.8.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 12.9.0](https://img.shields.io/badge/Version-12.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Bedag's common Helm chart to use for creating other Helm charts

Expand Down
4 changes: 4 additions & 0 deletions charts/common/ci/values.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ components:
services:
service-2:
deploy: true
clusterIP: "None"
# end common.service
# start common.networkpolicy
networkpolicies:
Expand All @@ -188,6 +189,9 @@ components:
controller:
deploy: true
type: "StatefulSet"
# serviceName has to reference an actual "services" entry (see above) so that
# spec.serviceName matches the governing Service's metadata.name.
serviceName: service-2

extraVolumeClaimTemplates:
- metadata:
Expand Down
4 changes: 4 additions & 0 deletions charts/common/templates/_statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ metadata:
spec:
replicas: {{ $statefulset.replicas | default 1 }}
revisionHistoryLimit: {{ $statefulset.revisionHistoryLimit | default 3 }}
{{- if $statefulset.serviceName }}
serviceName: {{ template "library.name" $root }}-{{ $name }}-{{ $statefulset.serviceName }}
{{- else }}
serviceName: {{ template "library.name" $root }}-{{ $name }}
{{- end }}
updateStrategy:
type: {{ $statefulset.updateStrategy | default "RollingUpdate" }}
selector:
Expand Down
3 changes: 3 additions & 0 deletions charts/common/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,9 @@
"type": "boolean",
"default": false
},
"serviceName": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
Expand Down
7 changes: 7 additions & 0 deletions charts/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,13 @@ components:
# type has to be "Deployment", "StatefulSet", "Job" or "CronJob"
type: "Deployment"

# serviceName is only used when type is "StatefulSet". It sets the governing Service
# (spec.serviceName) used for the StatefulSet's stable network identity. It has to be
# the key of a service defined under this component's "services" (see start common.service),
# so that the resulting Service name matches. Comment out to fall back to the component
# name, which only matches an actual Service if no "services" suffix is used.
# serviceName: service-1

# Extra annotations on all Pods
# We use this for example to set the prometheus annotations.
extraAnnotations: {}
Expand Down