Skip to content

Commit 66ed8be

Browse files
authored
Merge pull request #12 from Cryptophobia/master
Add stateless nsqd cluster support and update to nsq:v1.2.0
2 parents 9ae1d05 + 593e853 commit 66ed8be

File tree

7 files changed

+20
-8
lines changed

7 files changed

+20
-8
lines changed

charts/nsqd/templates/nsqd-pdb.yaml

+9
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 charts/nsqd/templates/nsqd-statefulset.yaml

+2-2
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

+3-2
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

+3
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

rootfs/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nsqio/nsq:v1.1.0
1+
FROM nsqio/nsq:v1.2.0
22

33
RUN mkdir -p /opt/nsq/data \
44
&& adduser \

rootfs/opt/nsq/bin/start-nsqd

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
2-
set -eo pipefail
32

43
export CONFIG_PATH=${CONFIG_PATH:-/opt/nsq/conf/nsqd.cfg}
54
exec nsqd -config "${CONFIG_PATH}"

rootfs/opt/nsq/conf/nsqd.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## log verbosity level: debug, info, warn, error, or fatal
2-
log_level = "warn"
2+
log-level = "warn"
33
verbose = false
44

55
## path to store disk-backed messages
66
data_path = "/opt/nsq/data"
77

88
## maximum RDY count for a client
9-
max_rdy_count = 10000
9+
max_rdy_count = 10000

0 commit comments

Comments
 (0)