Skip to content

Commit 9cea3ca

Browse files
jonstacksk8s-ci-robot
authored andcommitted
[stable/consul] Pass HttpPort to consul (helm#3375)
* Pass HttpPort to consul * Bump chart version * Update chart test to wait for pods to come up.
1 parent a5783d6 commit 9cea3ca

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

stable/consul/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: consul
22
home: https://github.com/hashicorp/consul
3-
version: 1.1.3
3+
version: 1.1.4
44
appVersion: 1.0.0
55
description: Highly available and distributed service discovery and key-value store
66
designed with support for the modern data center to make distributed systems and

stable/consul/templates/consul.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ spec:
263263
${GOSSIP_KEY} \
264264
{{- end }}
265265
-client=0.0.0.0 \
266-
-dns-port=${DNSPORT}
266+
-dns-port=${DNSPORT} \
267+
-http-port={{ .Values.HttpPort }}
267268
volumes:
268269
- name: gossip-key
269270
secret:

stable/consul/templates/test-config.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@ data:
66
run.sh: |-
77
@test "Testing Consul cluster has quorum" {
88
for i in {0..2}; do
9-
if [ `kubectl exec {{ .Release.Name }}-consul-$i consul members --namespace={{ .Release.Namespace }} | grep server | wc -l` -ge "3" ]; then
10-
echo "{{ .Release.Name }}-consul-$i OK. consul members returning at least 3 records."
11-
else
12-
echo "{{ .Release.Name }}-consul-$i ERROR. consul members returning less than 3 records."
13-
exit 1
14-
fi
9+
for n in {1..30}; do
10+
if [ `kubectl exec {{ .Release.Name }}-consul-$i consul members --namespace={{ .Release.Namespace }} | grep server | wc -l` -ge "3" ]; then
11+
echo "{{ .Release.Name }}-consul-$i OK. consul members returning at least 3 records."
12+
break
13+
else
14+
echo "{{ .Release.Name }}-consul-$i ERROR. consul members returning less than 3 records."
15+
fi
16+
17+
if [ "$n" -ge "30" ]; then
18+
echo "Failed $n times to get members from {{ .Release.Name }}-consul-$i"
19+
exit 1
20+
fi
21+
sleep 10
22+
done
1523
done
1624
}

0 commit comments

Comments
 (0)