Skip to content

Commit 593e853

Browse files
committed
feat(nsqd): add stateless nsqd cluster support
Signed-off-by: Cryptophobia <aouzounov@gmail.com>
1 parent 5a39724 commit 593e853

4 files changed

Lines changed: 17 additions & 4 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: policy/v1beta1
2+
kind: PodDisruptionBudget
3+
metadata:
4+
name: deis-nsqd
5+
spec:
6+
minAvailable: {{ .Values.replicas }}
7+
selector:
8+
matchLabels:
9+
app: deis-nsqd

charts/nsqd/templates/nsqd-deployment.yaml renamed to charts/nsqd/templates/nsqd-statefulset.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apiVersion: {{ template "APIVersion" . }}
2-
kind: Deployment
2+
kind: StatefulSet
33
metadata:
44
name: deis-nsqd
55
labels:
66
heritage: deis
77
annotations:
88
component.deis.io/version: {{ .Values.docker_tag }}
99
spec:
10-
replicas: 1
10+
replicas: {{ .Values.replicas }}
1111
strategy:
1212
type: Recreate
1313
selector:

charts/nsqd/templates/nsqd-svc.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ metadata:
66
heritage: deis
77
app: deis-nsqd
88
spec:
9+
clusterIP: None
910
ports:
10-
- port: 4151
11+
- port: {{ .Values.http_port }}
1112
name: http
1213
targetPort: http
13-
- port: 4150
14+
- port: {{ .Values.tcp_port }}
1415
name: transport
1516
targetPort: transport
1617
selector:

charts/nsqd/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ pull_policy: "Always"
33
docker_tag: "canary"
44
# limits_cpu: "100m"
55
# limits_memory: "50Mi"
6+
replicas: 1
7+
tcp_port: 4150
8+
http_port: 4151

0 commit comments

Comments
 (0)