Skip to content

Commit a03b6a6

Browse files
[charts/redis-ha] Add component: haproxy to relevant selectors. (#342)
* Add component: haproxy to relevant selectors. Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com> * Documenting changes. Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com> * Housekeeping: Icon fix. Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com> --------- Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com>
1 parent 666b28c commit a03b6a6

10 files changed

+27
-6
lines changed

charts/redis-ha/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ keywords:
55
- redis
66
- keyvalue
77
- database
8-
version: 4.34.0
8+
version: 4.34.1
99
appVersion: 7.2.7
1010
description: This Helm chart provides a highly available Redis implementation with a master/slave configuration and uses Sentinel sidecars for failover management
11-
icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png
11+
icon: https://img.icons8.com/external-tal-revivo-shadow-tal-revivo/24/external-redis-an-in-memory-data-structure-project-implementing-a-distributed-logo-shadow-tal-revivo.png
1212
maintainers:
1313
- email: aaron.layfield@gmail.com
1414
name: dandydeveloper

charts/redis-ha/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,3 +484,12 @@ As a result, from this version onwards Kubernetes versions older than 1.19 will
484484

485485
----------------------------------------------
486486
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)
487+
488+
## 4.34.1 - Upgrade may complain about selector label changes being immutable
489+
This version introduced changes to the selector labels for the Deployments. Depending on the policies in your cluster, you may see an error like this when upgrading:
490+
491+
```
492+
Error: UPGRADE FAILED: cannot patch "redis-redis-ha-haproxy" with kind Deployment: Deployment.apps "redis-redis-ha-haproxy" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"redis-ha-haproxy", "component":"haproxy", "release":"redis"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
493+
```
494+
495+
In these cases, you'll need to delete the Deployment for the haproxy, or simple do a forceful upgrade.

charts/redis-ha/templates/redis-haproxy-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
namespace: {{ .Release.Namespace | quote }}
77
labels:
88
{{ include "labels.standard" . | indent 4 }}
9+
component: haproxy
910
{{- range $key, $value := .Values.extraLabels }}
1011
{{ $key }}: {{ $value | quote }}
1112
{{- end }}
@@ -26,12 +27,14 @@ spec:
2627
matchLabels:
2728
app: {{ template "redis-ha.name" . }}-haproxy
2829
release: {{ .Release.Name }}
30+
component: haproxy
2931
template:
3032
metadata:
3133
name: {{ template "redis-ha.fullname" . }}-haproxy
3234
labels:
3335
app: {{ template "redis-ha.name" . }}-haproxy
3436
release: {{ .Release.Name }}
37+
component: haproxy
3538
{{- range $key, $value := .Values.haproxy.labels }}
3639
{{ $key }}: {{ $value | toString }}
3740
{{- end }}
@@ -77,6 +80,7 @@ spec:
7780
matchLabels:
7881
app: {{ template "redis-ha.name" . }}-haproxy
7982
release: {{ .Release.Name }}
83+
component: haproxy
8084
topologyKey: kubernetes.io/hostname
8185
{{- else }}
8286
preferredDuringSchedulingIgnoredDuringExecution:
@@ -86,6 +90,7 @@ spec:
8690
matchLabels:
8791
app: {{ template "redis-ha.name" . }}-haproxy
8892
release: {{ .Release.Name }}
93+
component: haproxy
8994
topologyKey: kubernetes.io/hostname
9095
{{- end }}
9196
{{- end }}
@@ -98,6 +103,7 @@ spec:
98103
matchLabels:
99104
app: {{ template "redis-ha.name" . }}-haproxy
100105
release: {{ .Release.Name }}
106+
component: haproxy
101107
{{- end }}
102108
initContainers:
103109
- name: config-init

charts/redis-ha/templates/redis-haproxy-network-policy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ spec:
2121
matchLabels:
2222
release: {{ .Release.Name }}
2323
app: {{ template "redis-ha.name" . }}-haproxy
24+
component: haproxy
2425
policyTypes:
2526
- Ingress
2627
- Egress

charts/redis-ha/templates/redis-haproxy-pdb.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ spec:
1414
matchLabels:
1515
release: {{ .Release.Name }}
1616
app: {{ template "redis-ha.name" . }}-haproxy
17+
component: haproxy
1718
{{ toYaml .Values.haproxy.podDisruptionBudget | indent 2 }}
1819
{{- end -}}

charts/redis-ha/templates/redis-haproxy-role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
namespace: {{ .Release.Namespace | quote }}
88
labels:
99
{{ include "labels.standard" . | indent 4 }}
10-
component: {{ template "redis-ha.fullname" . }}-haproxy
10+
component: haproxy
1111
{{- range $key, $value := .Values.extraLabels }}
1212
{{ $key }}: {{ $value | quote }}
1313
{{- end }}

charts/redis-ha/templates/redis-haproxy-rolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
namespace: {{ .Release.Namespace | quote }}
88
labels:
99
{{ include "labels.standard" . | indent 4 }}
10-
component: {{ template "redis-ha.fullname" . }}-haproxy
10+
component: haproxy
1111
{{- range $key, $value := .Values.extraLabels }}
1212
{{ $key }}: {{ $value | quote }}
1313
{{- end }}

charts/redis-ha/templates/redis-haproxy-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
namespace: {{ .Release.Namespace | quote }}
77
labels:
88
{{ include "labels.standard" . | indent 4 }}
9-
component: {{ template "redis-ha.fullname" . }}-haproxy
9+
component: haproxy
1010
{{- range $key, $value := .Values.extraLabels }}
1111
{{ $key }}: {{ $value | quote }}
1212
{{- end }}

charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ spec:
3535
matchLabels:
3636
app: {{ template "redis-ha.name" . }}
3737
release: {{ .Release.Name }}
38-
component: {{ template "redis-ha.fullname" . }}-haproxy
38+
component: haproxy
3939
{{- end }}

charts/redis-ha/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,10 @@ containerSecurityContext:
645645
# -- Node labels for pod assignment
646646
nodeSelector: {}
647647

648+
## -- Tolerations for pod assignment
649+
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
650+
tolerations: []
651+
648652
# -- Whether the Redis server pods should be forced to run on separate nodes.
649653
## This is accomplished by setting their AntiAffinity with requiredDuringSchedulingIgnoredDuringExecution as opposed to preferred.
650654
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature

0 commit comments

Comments
 (0)