Skip to content

Commit a1448bd

Browse files
[common] feature add - ClusterIP for service manifest (#372)
* [common] feature add - ClusterIP for service manifest * add helm docs
1 parent 9e3cb69 commit a1448bd

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

charts/common/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: common
33
description: A generic helm chart for Kubernetes
44
type: application
5-
version: 0.11.1
5+
version: 0.12.0
66
maintainers:
77
- name: Parity
88
url: https://github.com/paritytech/helm-charts

charts/common/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ This is intended behaviour. Make sure to run `git add -A` once again to stage ch
6969
| replicaCount | int | `1` | Number of replicas for the pod |
7070
| resources | object | `{}` | Resource limits & requests |
7171
| secrets | object | `{}` | Creates a secret resource The value must be base64 encoded |
72-
| service | object | `{"annotations":{},"ports":[],"sessionAffinity":"","type":"ClusterIP"}` | Creates a service resource |
72+
| service | object | `{"annotations":{},"clusterIP":"","ports":[],"sessionAffinity":"","type":"ClusterIP"}` | Creates a service resource |
7373
| service.annotations | object | `{}` | Annotations to add to the Service resource |
74+
| service.clusterIP | string | `""` | Headless service |
7475
| service.ports | list | `[]` | Ports to expose on the service |
7576
| service.sessionAffinity | string | `""` | Session Affinitiy type |
7677
| service.type | string | `"ClusterIP"` | Service type |

charts/common/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ metadata:
1111
{{- end }}
1212
spec:
1313
type: {{ .Values.service.type }}
14+
{{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }}
15+
clusterIP: {{ .Values.service.clusterIP }}
16+
{{- end }}
1417
{{- if .Values.service.sessionAffinity }}
1518
sessionAffinity: {{ .Values.service.sessionAffinity }}
1619
{{- end }}

charts/common/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ service:
112112
annotations: {}
113113
# -- Service type
114114
type: ClusterIP
115+
# -- Headless service
116+
clusterIP: ""
115117
# -- Session Affinitiy type
116118
sessionAffinity: ""
117119
# -- Ports to expose on the service

0 commit comments

Comments
 (0)