Skip to content

Commit

Permalink
feat: adding new way to add ping mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
deimosfr committed Oct 17, 2018
1 parent 8a3119d commit d6b428a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kubernetes/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ data:
[metrics.statistics]
recentErrors = 10
[ping]
entryPoint = "ping"
[kubernetes]
endpoint = {{ .Values.traefikConfigK8sEndpoint | quote }}
Expand Down Expand Up @@ -68,6 +71,8 @@ data:
address = ":443"
compress = true
[entryPoints.https.tls]
[entryPoints.ping]
address = ":8081"
resolv.conf: |-
nameserver {{ .Values.traefikResolvConfNameServer }}
search {{ .Release.Namespace }}.svc.{{ .Values.traefikResolvConfDomainNameCluster }} svc.{{ .Values.traefikResolvConfDomainNameCluster }} {{ .Values.traefikResolvConfDomainNameCluster }}
Expand Down
8 changes: 8 additions & 0 deletions tests/traefik/deploy.bats
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,12 @@ load ../k8s-euft/env
echo "Error while getting consul key info"
exit 1
fi
}

@test "Check that ping port is working fine" {
instance_name=$(kubectl get po -l app=traefik | awk '/^traefik/{ print $1 }' | tail -1)
if [ "$(kubectl exec -it $instance_name curl http://127.0.0.1:8081/ping)" != 'OK' ] ; then
echo "Error while getting consul key info"
exit 1
fi
}

0 comments on commit d6b428a

Please sign in to comment.