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
11 changes: 8 additions & 3 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.9.0
version: 12.10.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 @@ -28,7 +28,12 @@ annotations:
artifacthub.io/license: Apache-2.0
artifacthub.io/changes: |
- kind: added
description: StatefulSet serviceName now matches the governing Service name via optional controller.serviceName
description: Added components.<name>.services.<name>.ports list to allow defining multiple ports on a single Service (e.g. for a StatefulSet's governing/headless service)
links:
- name: GitHub Issue
url: https://github.com/bedag/helm-charts/issues/185
url: https://github.com/bedag/helm-charts/issues/187
- kind: added
description: Added components.<name>.services.<name>.publishNotReadyAddresses to support StatefulSet governing services addressable before pods are ready
links:
- name: GitHub Issue
url: https://github.com/bedag/helm-charts/issues/187
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.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)
![Version: 12.10.0](https://img.shields.io/badge/Version-12.10.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
8 changes: 8 additions & 0 deletions charts/common/ci/values.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ components:
service-2:
deploy: true
clusterIP: "None"
publishNotReadyAddresses: true
ports:
- name: data
port: 9200
targetPort: 9200
- name: config
port: 9300
targetPort: 9300
# end common.service
# start common.networkpolicy
networkpolicies:
Expand Down
13 changes: 13 additions & 0 deletions charts/common/templates/_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,24 @@ spec:
{{- if $service.clusterIP }}
clusterIP: {{ $service.clusterIP }}
{{- end }}
{{- if hasKey $service "publishNotReadyAddresses" }}
publishNotReadyAddresses: {{ $service.publishNotReadyAddresses }}
{{- end }}
{{- if $service.ports }}
ports:
{{- range $service.ports }}
- name: {{ .name }}
port: {{ .port }}
targetPort: {{ .targetPort }}
protocol: {{ .protocol | default "TCP" }}
{{- end }}
{{- else }}
ports:
- name: {{ $service.name | default "http" }}
port: {{ $service.port | default "80" }}
targetPort: {{ $service.targetPort | default "http" }}
protocol: {{ $service.protocol | default "TCP" }}
{{- end }}
selector:
{{- if not $service.overrideSelectors }}
app.kubernetes.io/name: {{ template "library.name" $root }}
Expand Down
18 changes: 18 additions & 0 deletions charts/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,30 @@ components:
# protocol:
# clusterIP is optional with an empty default
# clusterIP: "None"
# publishNotReadyAddresses is optional and unset by default. Useful for StatefulSet
# governing/headless services so pods are addressable via DNS before they're ready.
# publishNotReadyAddresses: true
# overrideSelectors is optional for overridding the default labels: 'app.kubernetes.io/name' & 'app.kubernetes.io/component'
# overrideSelectors:
# label2.1: "label2"
# label2.2: "label2"
# sessionAffinity supports "ClientIP" and "None". Used to maintain session affinity. Default value is "None".
# sessionAffinity: "ClientIP"
# ports is optional and allows defining multiple ports on a single Service (e.g. for a
# StatefulSet's governing service). If set, it takes precedence over the singular
# name/port/targetPort/protocol fields above. Each entry supports:
# name - required, port name
# port - required, service port
# targetPort - required, target port on the pod
# protocol - optional, default "TCP"
# ports:
# - name: data
# port: 9200
# targetPort: 9200
# - name: config
# port: 9300
# targetPort: 9300
# protocol: TCP
# end common.service
# start common.networkpolicy
# networkpolicy allows access from outside of the namespace or from other pods
Expand Down