Add global.enabled to disable all components by default
This commit is contained in:
parent
7ff71983f1
commit
3a61646b1d
10 changed files with 21 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
||||||
# DaemonSet to run the Consul clients on every node.
|
# DaemonSet to run the Consul clients on every node.
|
||||||
{{- if .Values.client.enabled }}
|
{{- if (default .Values.client.enabled .Values.global.enabled) }}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# The deployment for running the Connect sidecar injector
|
# The deployment for running the Connect sidecar injector
|
||||||
{{- if .Values.connectInject.enabled }}
|
{{- if (default .Values.connectInject.enabled .Values.global.enabled) }}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# The MutatingWebhookConfiguration to enable the Connect injector.
|
# The MutatingWebhookConfiguration to enable the Connect injector.
|
||||||
{{- if (.Values.connectInject.enabled) and (.Values.connectInject.caBundle) }}
|
{{- if (default .Values.connectInject.enabled .Values.global.enabled) }}
|
||||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||||
kind: MutatingWebhookConfiguration
|
kind: MutatingWebhookConfiguration
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# The service for the Connect sidecar injector
|
# The service for the Connect sidecar injector
|
||||||
{{- if .Values.connectInject.enabled }}
|
{{- if (default .Values.connectInject.enabled .Values.global.enabled) }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# StatefulSet to run the actual Consul server cluster.
|
# StatefulSet to run the actual Consul server cluster.
|
||||||
{{- if .Values.server.enabled }}
|
{{- if (default .Values.server.enabled .Values.global.enabled) }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# PodDisruptionBudget to prevent degrading the server cluster through
|
# PodDisruptionBudget to prevent degrading the server cluster through
|
||||||
# voluntary cluster changes.
|
# voluntary cluster changes.
|
||||||
{{- if (.Values.server.enabled) and (.Values.server.disruptionBudget.enabled) }}
|
{{- if (and (default .Values.server.enabled .Values.global.enabled) (default .Values.server.disruptionBudget.enabled .Values.global.enabled)) }}
|
||||||
apiVersion: policy/v1beta1
|
apiVersion: policy/v1beta1
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# the agent is installed locally on the node and the NODE_IP should be used.
|
# the agent is installed locally on the node and the NODE_IP should be used.
|
||||||
# If the node can't run a Consul agent, then this service can be used to
|
# If the node can't run a Consul agent, then this service can be used to
|
||||||
# communicate directly to a server agent.
|
# communicate directly to a server agent.
|
||||||
{{- if .Values.server.enabled }}
|
{{- if (default .Values.server.enabled .Values.global.enabled) }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# StatefulSet to run the actual Consul server cluster.
|
# StatefulSet to run the actual Consul server cluster.
|
||||||
{{- if .Values.server.enabled }}
|
{{- if (default .Values.server.enabled .Values.global.enabled) }}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# the agent is installed locally on the node and the NODE_IP should be used.
|
# the agent is installed locally on the node and the NODE_IP should be used.
|
||||||
# If the node can't run a Consul agent, then this service can be used to
|
# If the node can't run a Consul agent, then this service can be used to
|
||||||
# communicate directly to a server agent.
|
# communicate directly to a server agent.
|
||||||
{{- if (.Values.server.enabled) and (.Values.ui.enabled) and (.Values.ui.service) }}
|
{{- if (and (default .Values.server.enabled .Values.global.enabled) (default .Values.ui.enabled .Values.global.enabled) (default .Values.ui.service .Values.global.enabled)) }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
|
17
values.yaml
17
values.yaml
|
@ -4,12 +4,19 @@
|
||||||
# be disabled if you plan on connecting to a Consul cluster external to
|
# be disabled if you plan on connecting to a Consul cluster external to
|
||||||
# the Kube cluster.
|
# the Kube cluster.
|
||||||
|
|
||||||
|
global:
|
||||||
|
# enabled is the master enabled switch. Setting this to true or false
|
||||||
|
# will enable or disable all the components within this chart by default.
|
||||||
|
# Each component can be overridden using the component-specific "enabled"
|
||||||
|
# value.
|
||||||
|
enabled: true
|
||||||
|
|
||||||
common:
|
common:
|
||||||
# Domain to register the Consul DNS server to listen for.
|
# Domain to register the Consul DNS server to listen for.
|
||||||
domain: consul
|
domain: consul
|
||||||
|
|
||||||
server:
|
server:
|
||||||
enabled: true
|
enabled: null
|
||||||
image: "consul:1.2.2"
|
image: "consul:1.2.2"
|
||||||
replicas: 3
|
replicas: 3
|
||||||
bootstrapExpect: 3 # Should <= replicas count
|
bootstrapExpect: 3 # Should <= replicas count
|
||||||
|
@ -39,7 +46,7 @@ server:
|
||||||
# disruptionBudget enables the creation of a PodDisruptionBudget to
|
# disruptionBudget enables the creation of a PodDisruptionBudget to
|
||||||
# prevent voluntary degrading of the Consul server cluster.
|
# prevent voluntary degrading of the Consul server cluster.
|
||||||
disruptionBudget:
|
disruptionBudget:
|
||||||
enabled: true
|
enabled: null
|
||||||
|
|
||||||
# maxUnavailable will default to (n/2)-1 where n is the number of
|
# maxUnavailable will default to (n/2)-1 where n is the number of
|
||||||
# replicas. If you'd like a custom value, you can specify an override here.
|
# replicas. If you'd like a custom value, you can specify an override here.
|
||||||
|
@ -54,13 +61,13 @@ server:
|
||||||
# within the Kube cluster. The current deployment model follows a traditional
|
# within the Kube cluster. The current deployment model follows a traditional
|
||||||
# DC where a single agent is deployed per node.
|
# DC where a single agent is deployed per node.
|
||||||
client:
|
client:
|
||||||
enabled: true
|
enabled: null
|
||||||
image: "consul:1.2.2"
|
image: "consul:1.2.2"
|
||||||
join: null
|
join: null
|
||||||
|
|
||||||
# ConnectInject will enable the automatic Connect sidecar injector.
|
# ConnectInject will enable the automatic Connect sidecar injector.
|
||||||
connectInject:
|
connectInject:
|
||||||
enabled: true
|
enabled: null
|
||||||
image: "us.gcr.io/mitchellh-k8s/consul-k8s:latest"
|
image: "us.gcr.io/mitchellh-k8s/consul-k8s:latest"
|
||||||
default: false # true will inject by default, otherwise requires annotation
|
default: false # true will inject by default, otherwise requires annotation
|
||||||
caBundle: "" # empty will auto generate the bundle
|
caBundle: "" # empty will auto generate the bundle
|
||||||
|
@ -97,7 +104,7 @@ ui:
|
||||||
# on the server nodes. This makes UI access via the service below (if
|
# on the server nodes. This makes UI access via the service below (if
|
||||||
# enabled) predictable rather than "any node" if you're running Consul
|
# enabled) predictable rather than "any node" if you're running Consul
|
||||||
# clients as well.
|
# clients as well.
|
||||||
enabled: true
|
enabled: null
|
||||||
|
|
||||||
# True if you want to create a Service entry for the Consul UI.
|
# True if you want to create a Service entry for the Consul UI.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue