From fb4cc4e518b07cc4179ec67b91b6e000e5bfa730 Mon Sep 17 00:00:00 2001 From: Yong Wen Chua Date: Fri, 23 Oct 2020 10:36:49 +0800 Subject: [PATCH] Fix Consul ESM Bugs (#31) - Config file not being used - Incorrect Ping interval value --- charts/consul-esm/Chart.yaml | 4 ++-- charts/consul-esm/templates/configmap.yaml | 4 ++-- charts/consul-esm/templates/deployment.yaml | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/charts/consul-esm/Chart.yaml b/charts/consul-esm/Chart.yaml index 670003a..ff53a09 100644 --- a/charts/consul-esm/Chart.yaml +++ b/charts/consul-esm/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -appVersion: "0.3.3" +appVersion: "0.4.0" description: Consul ESM for external service health checks in Consul name: consul-esm -version: 0.2.0 +version: 0.2.2 home: https://github.com/hashicorp/consul-esm diff --git a/charts/consul-esm/templates/configmap.yaml b/charts/consul-esm/templates/configmap.yaml index 88da045..ef5f53e 100644 --- a/charts/consul-esm/templates/configmap.yaml +++ b/charts/consul-esm/templates/configmap.yaml @@ -36,13 +36,13 @@ data: # The interval to ping and update coordinates for external nodes that have # 'external-probe' set to true. By default, ESM will attempt to ping and # update the coordinates for all nodes it is watching every 10 seconds. - node_probe_interval = "{{ .Values.config.node_probe_interval }}" + node_probe_interval = "{{ .Values.config.nodeProbeInterval }}" {{- if .Values.config.httpAddr }} # The address of the local Consul agent. Can also be provided through the # CONSUL_HTTP_ADDR environment variable. http_addr = "{{ .Values.config.httpAddr }}" - {{- end -}} + {{- end }} # The ACL token to use when communicating with the local Consul agent. Can # also be provided through the CONSUL_HTTP_TOKEN environment variable. diff --git a/charts/consul-esm/templates/deployment.yaml b/charts/consul-esm/templates/deployment.yaml index 6cf2294..d6e4d93 100644 --- a/charts/consul-esm/templates/deployment.yaml +++ b/charts/consul-esm/templates/deployment.yaml @@ -75,6 +75,9 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - /bin/consul-esm + - -config-file=/config/config.hcl resources: {{- toYaml .Values.resources | nindent 12 }} {{- if (or .Values.env .Values.config.useNodeAgent.enabled) }}