From c9a55882646126e0cce88cfa315a884b4b29edf9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 8 Sep 2018 07:52:31 -0700 Subject: [PATCH] Move datacenter to global --- templates/client-daemonset.yaml | 2 +- templates/server-statefulset.yaml | 2 +- values.yaml | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/client-daemonset.yaml b/templates/client-daemonset.yaml index 50cde56..4aae0e2 100644 --- a/templates/client-daemonset.yaml +++ b/templates/client-daemonset.yaml @@ -61,7 +61,7 @@ spec: -bind=0.0.0.0 \ -client=0.0.0.0 \ -config-dir=/consul/config \ - -datacenter={{ .Values.server.datacenter }} \ + -datacenter={{ .Values.global.datacenter }} \ -data-dir=/consul/data \ {{- if (.Values.client.join) and (gt (len .Values.client.join) 0) }} {{- range $value := .Values.client.join }} diff --git a/templates/server-statefulset.yaml b/templates/server-statefulset.yaml index e078621..8bc2d4a 100644 --- a/templates/server-statefulset.yaml +++ b/templates/server-statefulset.yaml @@ -75,7 +75,7 @@ spec: -bootstrap-expect={{ .Values.server.bootstrapExpect }} \ -client=0.0.0.0 \ -config-dir=/consul/config \ - -datacenter={{ .Values.server.datacenter }} \ + -datacenter={{ .Values.global.datacenter }} \ -data-dir=/consul/data \ -domain={{ .Values.global.domain }} \ {{- if .Values.server.connect }} diff --git a/values.yaml b/values.yaml index a31527f..194bad4 100644 --- a/values.yaml +++ b/values.yaml @@ -18,6 +18,12 @@ global: # servers below. This can be overridden per component. image: "consul:1.2.2" + # Datacenter is the name of the datacenter that the agents should register + # as. This shouldn't be changed once the Consul cluster is up and running + # since Consul doesn't support an automatic way to change this value + # currently: https://github.com/hashicorp/consul/issues/1858 + datacenter: dc1 + server: enabled: "-" image: null @@ -30,12 +36,6 @@ server: # via the extraConfig setting. connect: true - # Datacenter is the name of the datacenter that the server should register - # as. This shouldn't be changed once the Consul cluster is up and running - # since Consul doesn't support an automatic way to change this value - # currently: https://github.com/hashicorp/consul/issues/1858 - datacenter: dc1 - # Resource requests, limits, etc. for the server cluster placement. This # should map directly to the value of the resources field for a PodSpec. # By default no direct resource request is made.