Skip to content

Commit

Permalink
[CN-1038] Refactor charts to clean up duplications (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
semihbkgr committed Nov 15, 2023
1 parent 1434558 commit 8640222
Show file tree
Hide file tree
Showing 30 changed files with 60 additions and 134 deletions.
2 changes: 1 addition & 1 deletion stable/hazelcast-enterprise/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: hazelcast-enterprise
version: 5.10.10
version: 5.10.11
appVersion: "5.3.6"
kubeVersion: ">=1.19.0-0"
description: Hazelcast is a streaming and memory-first application platform for fast, stateful, data-intensive workloads on-premises, at the edge or as a fully managed cloud service.
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast-enterprise/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ metadata:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
{{- range $key, $val := .Values.hazelcast.configurationFiles }}
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast-enterprise/templates/mancenter-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ metadata:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
hazelcast-client.yaml: |-
Expand Down
4 changes: 1 addition & 3 deletions stable/hazelcast-enterprise/templates/mancenter-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ metadata:
{{- end }}
{{- if or .Values.mancenter.ingress.annotations .Values.commonAnnotations }}
annotations:
{{- range $key, $val := (merge nil .Values.mancenter.ingress.annotations .Values.commonAnnotations) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- merge nil .Values.mancenter.ingress.annotations .Values.commonAnnotations | toYaml | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.mancenter.ingress.className }}
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast-enterprise/templates/mancenter-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ metadata:
{{- range $key, $value := (merge nil .Values.mancenter.service.labels .Values.commonLabels) }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.mancenter.service.type }}
Expand Down
18 changes: 5 additions & 13 deletions stable/hazelcast-enterprise/templates/mancenter-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ metadata:
{{- range $key, $value := (merge nil .Values.mancenter.labels .Values.commonLabels) }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
serviceName: {{ template "mancenter.fullname" . }}
Expand All @@ -33,16 +31,12 @@ spec:
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
role: mancenter
{{- if or .Values.mancenter.podLabels .Values.commonLabels }}
{{- range $key, $val := (merge nil .Values.mancenter.podLabels .Values.commonLabels) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
{{- if or .Values.mancenter.annotations .Values.commonAnnotations }}
annotations:
{{- range $key, $val := (merge nil .Values.mancenter.annotations .Values.commonAnnotations) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- merge nil .Values.mancenter.annotations .Values.commonAnnotations | toYaml | nindent 8 }}
{{- end }}
spec:
{{- if .Values.mancenter.image.pullSecrets }}
Expand Down Expand Up @@ -242,11 +236,9 @@ spec:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
accessModes:
Expand Down
4 changes: 1 addition & 3 deletions stable/hazelcast-enterprise/templates/metrics-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ metadata:
{{- end }}
{{- if or .Values.metrics.service.annotations .Values.commonAnnotations }}
annotations:
{{- range $key, $val := (merge nil .Values.metrics.service.annotations .Values.commonAnnotations) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- merge nil .Values.metrics.service.annotations .Values.commonAnnotations | toYaml | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.metrics.service.type }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ metadata:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast-enterprise/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ metadata:
{{- range $key, $val := (merge nil .Values.metrics.prometheusRule.labels .Values.commonLabels) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
groups:
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast-enterprise/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ metadata:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- apiGroups:
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast-enterprise/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ metadata:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast-enterprise/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ metadata:
{{- range $key, $value := (merge nil .Values.service.labels .Values.commonLabels) }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast-enterprise/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ metadata:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end -}}
6 changes: 2 additions & 4 deletions stable/hazelcast-enterprise/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ metadata:
{{- range $key, $val := (merge nil .Values.metrics.serviceMonitor.labels .Values.commonLabels) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
Expand Down
12 changes: 3 additions & 9 deletions stable/hazelcast-enterprise/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ metadata:
{{- end }}
{{- if or .Values.annotations .Values.commonAnnotations }}
annotations:
{{- range $key, $val := (merge nil .Values.annotations .Values.commonAnnotations) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- merge nil .Values.annotations .Values.commonAnnotations | toYaml | nindent 4 }}
{{- end }}
spec:
serviceName: {{ template "hazelcast.fullname" . }}
Expand All @@ -33,11 +31,9 @@ spec:
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
role: hazelcast
{{- if or .Values.podLabels .Values.commonLabels }}
{{- range $key, $val := (merge nil .Values.podLabels .Values.commonLabels) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
annotations:
checksum/hazelcast-config: {{ toYaml .Values.hazelcast.yaml | sha256sum }}
{{- range $key, $val := (merge nil .Values.annotations .Values.commonAnnotations) }}
Expand Down Expand Up @@ -246,11 +242,9 @@ spec:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
accessModes:
Expand Down
2 changes: 1 addition & 1 deletion stable/hazelcast/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: hazelcast
version: 5.8.11
version: 5.8.12
appVersion: "5.3.6"
kubeVersion: ">=1.19.0-0"
description: Hazelcast is a streaming and memory-first application platform for fast, stateful, data-intensive workloads on-premises, at the edge or as a fully managed cloud service.
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ metadata:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
{{- range $key, $val := .Values.hazelcast.configurationFiles }}
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast/templates/mancenter-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ metadata:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
hazelcast-client.yaml: |-
Expand Down
4 changes: 1 addition & 3 deletions stable/hazelcast/templates/mancenter-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ metadata:
{{- end }}
{{- if or .Values.mancenter.ingress.annotations .Values.commonAnnotations }}
annotations:
{{- range $key, $val := (merge nil .Values.mancenter.ingress.annotations .Values.commonAnnotations) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- merge nil .Values.mancenter.ingress.annotations .Values.commonAnnotations | toYaml | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.mancenter.ingress.className }}
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast/templates/mancenter-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ metadata:
{{- range $key, $value := (merge nil .Values.mancenter.service.labels .Values.commonLabels) }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.mancenter.service.type }}
Expand Down
18 changes: 5 additions & 13 deletions stable/hazelcast/templates/mancenter-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ metadata:
{{- range $key, $value := (merge nil .Values.mancenter.labels .Values.commonLabels) }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
serviceName: {{ template "mancenter.fullname" . }}
Expand All @@ -33,16 +31,12 @@ spec:
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
role: mancenter
{{- if or .Values.mancenter.podLabels .Values.commonLabels }}
{{- range $key, $val := (merge nil .Values.mancenter.podLabels .Values.commonLabels) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
{{- if or .Values.mancenter.annotations .Values.commonAnnotations }}
annotations:
{{- range $key, $val := (merge nil .Values.mancenter.annotations .Values.commonAnnotations) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- merge nil .Values.mancenter.annotations .Values.commonAnnotations | toYaml | nindent 8 }}
{{- end }}
spec:
{{- if .Values.mancenter.image.pullSecrets }}
Expand Down Expand Up @@ -233,11 +227,9 @@ spec:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
accessModes:
Expand Down
4 changes: 1 addition & 3 deletions stable/hazelcast/templates/metrics-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ metadata:
{{- end }}
{{- if or .Values.metrics.service.annotations .Values.commonAnnotations }}
annotations:
{{- range $key, $val := (merge nil .Values.metrics.service.annotations .Values.commonAnnotations) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- merge nil .Values.metrics.service.annotations .Values.commonAnnotations | toYaml | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.metrics.service.type }}
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ metadata:
{{- range $key, $value := .Values.commonLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
Expand Down
6 changes: 2 additions & 4 deletions stable/hazelcast/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ metadata:
{{- range $key, $val := (merge nil .Values.metrics.prometheusRule.labels .Values.commonLabels) }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- with .Values.commonAnnotations }}
annotations:
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
groups:
Expand Down
Loading

0 comments on commit 8640222

Please sign in to comment.