Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
keydb: 0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiarchitect committed May 11, 2021
1 parent 6cad219 commit d2597ea
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion keydb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: keydb
description: A Helm chart for KeyDB multimaster setup
type: application
version: 0.17.0
version: 0.18.0
keywords:
- keydb
- redis
Expand Down
2 changes: 1 addition & 1 deletion keydb/templates/secret-utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ stringData:
replicas=()
for node in {0..{{ (sub (.Values.nodes | int) 1) }}}; do
if [ "$host" != "{{ include "keydb.fullname" . }}-${node}" ]; then
replicas+=("--replicaof {{ include "keydb.fullname" . }}-${node}.{{ include "keydb.fullname" . }} ${port}")
replicas+=("--replicaof {{ include "keydb.fullname" . }}-${node}.{{ include "keydb.fullname" . }}-headless ${port}")
fi
done
exec keydb-server /etc/keydb/redis.conf \
Expand Down
2 changes: 1 addition & 1 deletion keydb/templates/sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
{{ include "keydb.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.nodes }}
serviceName: {{ include "keydb.fullname" . }}
serviceName: {{ include "keydb.fullname" . }}-headless

This comment has been minimized.

Copy link
@macropin

macropin Nov 16, 2021

This breaks upgrades: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden

This comment has been minimized.

Copy link
@Antiarchitect

Antiarchitect Nov 16, 2021

Author Contributor

Should be done via new major release. In order to mitigate you should delete the StatefulSet with kubectl --cascade=false option and then redeploy.

selector:
matchLabels:
{{ include "keydb.selectorLabels" . | nindent 6 }}
Expand Down
19 changes: 19 additions & 0 deletions keydb/templates/svc-headless.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Headless service
apiVersion: v1
kind: Service
metadata:
name: {{ include "keydb.fullname" . }}-headless
labels:
{{ include "keydb.labels" . | nindent 4 }}
annotations:
{{ toYaml .Values.service.annotations | nindent 4 }}
spec:
type: ClusterIP
clusterIP: None
ports:
- name: server
port: {{ .Values.port | int }}
protocol: TCP
targetPort: keydb
selector:
{{ include "keydb.selectorLabels" . | nindent 4 }}
3 changes: 1 addition & 2 deletions keydb/templates/svc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Headless service for proper name resolution
apiVersion: v1
kind: Service
metadata:
Expand All @@ -9,7 +8,6 @@ metadata:
{{ toYaml .Values.service.annotations | nindent 4 }}
spec:
type: ClusterIP
clusterIP: None

This comment has been minimized.

Copy link
@macropin

macropin Nov 16, 2021

This causes upgrade issues: "spec.clusterIP: Invalid value: "": field is immutable"

This comment has been minimized.

Copy link
@Antiarchitect

Antiarchitect Nov 16, 2021

Author Contributor

Should be done via new major release. In order to mitigate you should delete the Service and then redeploy.

ports:
- name: server
port: {{ .Values.port | int }}
Expand All @@ -21,3 +19,4 @@ spec:
targetPort: redis-exporter
selector:
{{ include "keydb.selectorLabels" . | nindent 4 }}
sessionAffinity: ClientIP

0 comments on commit d2597ea

Please sign in to comment.