This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 385
/
values.yaml
2227 lines (1988 loc) · 80.1 KB
/
values.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Available parameters and their default values for the Consul chart.
# Holds values that affect multiple components of the chart.
global:
# The main enabled/disabled setting. If true, servers,
# clients, Consul DNS and the Consul UI will be enabled. Each component can override
# this default via its component-specific "enabled" config. If false, no components
# will be installed by default and per-component opt-in is required, such as by
# setting `server.enabled` to true.
enabled: true
# The default log level to apply to all components which do not otherwise override this setting.
# It is recommended to generally not set this below "info" unless actively debugging due to logging verbosity.
# One of "debug", "info", "warn", or "error".
# @type: string
logLevel: "info"
# Enable all component logs to be output in JSON format.
# @type: boolean
logJSON: false
# Set the prefix used for all resources in the Helm chart. If not set,
# the prefix will be `<helm release name>-consul`.
# @type: string
name: null
# The domain Consul will answer DNS queries for
# (see `-domain` (https://consul.io/docs/agent/options#_domain)) and the domain services synced from
# Consul into Kubernetes will have, e.g. `service-name.service.consul`.
domain: consul
# The name (and tag) of the Consul Docker image for clients and servers.
# This can be overridden per component. This should be pinned to a specific
# version tag, otherwise you may inadvertently upgrade your Consul version.
#
# Examples:
#
# ```yaml
# # Consul 1.10.0
# image: "consul:1.10.0"
# # Consul Enterprise 1.10.0
# image: "hashicorp/consul-enterprise:1.10.0-ent"
# ```
# @default: hashicorp/consul:<latest version>
image: "hashicorp/consul:1.10.0"
# Array of objects containing image pull secret names that will be applied to each service account.
# This can be used to reference image pull secrets if using a custom consul or consul-k8s Docker image.
# See https://kubernetes.io/docs/concepts/containers/images/#using-a-private-registry for reference.
#
# Example:
#
# ```yaml
# imagePullSecrets:
# - name: pull-secret-name
# - name: pull-secret-name-2
# ```
# @type: array<map>
imagePullSecrets: []
# The name (and tag) of the consul-k8s (https://github.com/hashicorp/consul-k8s)
# Docker image that is used for functionality such the catalog sync.
# This can be overridden per component.
# @default: hashicorp/consul-k8s:<latest version>
imageK8S: "hashicorp/consul-k8s:0.26.0"
# The name of the datacenter that the agents should
# register as. This can'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
# Controls whether pod security policies are created for the Consul components
# created by this chart. See https://kubernetes.io/docs/concepts/policy/pod-security-policy/.
enablePodSecurityPolicies: false
# Configures which Kubernetes secret to retrieve Consul's
# gossip encryption key from (see `-encrypt` (https://consul.io/docs/agent/options#_encrypt)). If secretName or
# secretKey are not set, gossip encryption will not be enabled. The secret must
# be in the same namespace that Consul is installed into.
#
# The secret can be created by running:
#
# ```shell
# $ kubectl create secret generic consul-gossip-encryption-key --from-literal=key=$(consul keygen)
# ```
#
# To reference, use:
#
# ```yaml
# global:
# gossipEncryption:
# secretName: consul-gossip-encryption-key
# secretKey: key
# ```
gossipEncryption:
# secretName is the name of the Kubernetes secret that holds the gossip
# encryption key. The secret must be in the same namespace that Consul is installed into.
secretName: ""
# secretKey is the key within the Kubernetes secret that holds the gossip
# encryption key.
secretKey: ""
# A list of addresses of upstream DNS servers that are used to recursively resolve DNS queries.
# These values are given as `-recursor` flags to Consul servers and clients.
# See https://www.consul.io/docs/agent/options#_recursor for more details.
# If this is an empty array (the default), then Consul DNS will only resolve queries for the Consul top level domain (by default `.consul`).
# @type: array<string>
recursors: []
# Enables TLS (https://learn.hashicorp.com/tutorials/consul/tls-encryption-secure)
# across the cluster to verify authenticity of the Consul servers and clients.
# Requires Consul v1.4.1+ and consul-k8s v0.16.2+
tls:
# If true, the Helm chart will enable TLS for Consul
# servers and clients and all consul-k8s components, as well as generate certificate
# authority (optional) and server and client certificates.
enabled: false
# If true, turns on the auto-encrypt feature on clients and servers.
# It also switches consul-k8s components to retrieve the CA from the servers
# via the API. Requires Consul 1.7.1+ and consul-k8s 0.13.0
enableAutoEncrypt: false
# A list of additional DNS names to set as Subject Alternative Names (SANs)
# in the server certificate. This is useful when you need to access the
# Consul server(s) externally, for example, if you're using the UI.
# @type: array<string>
serverAdditionalDNSSANs: []
# A list of additional IP addresses to set as Subject Alternative Names (SANs)
# in the server certificate. This is useful when you need to access the
# Consul server(s) externally, for example, if you're using the UI.
# @type: array<string>
serverAdditionalIPSANs: []
# If true, `verify_outgoing`, `verify_server_hostname`,
# and `verify_incoming_rpc` will be set to `true` for Consul servers and clients.
# Set this to false to incrementally roll out TLS on an existing Consul cluster.
# Please see https://consul.io/docs/k8s/operations/tls-on-existing-cluster
# for more details.
verify: true
# If true, the Helm chart will configure Consul to disable the HTTP port on
# both clients and servers and to only accept HTTPS connections.
httpsOnly: true
# A Kubernetes secret containing the certificate of the CA to use for
# TLS communication within the Consul cluster. If you have generated the CA yourself
# with the consul CLI, you could use the following command to create the secret
# in Kubernetes:
#
# ```bash
# kubectl create secret generic consul-ca-cert \
# --from-file='tls.crt=./consul-agent-ca.pem'
# ```
caCert:
# The name of the Kubernetes secret.
secretName: null
# The key of the Kubernetes secret.
secretKey: null
# A Kubernetes secret containing the private key of the CA to use for
# TLS communication within the Consul cluster. If you have generated the CA yourself
# with the consul CLI, you could use the following command to create the secret
# in Kubernetes:
#
# ```bash
# kubectl create secret generic consul-ca-key \
# --from-file='tls.key=./consul-agent-ca-key.pem'
# ```
#
# Note that we need the CA key so that we can generate server and client certificates.
# It is particularly important for the client certificates since they need to have host IPs
# as Subject Alternative Names. In the future, we may support bringing your own server
# certificates.
caKey:
# The name of the Kubernetes secret.
secretName: null
# The key of the Kubernetes secret.
secretKey: null
# [Enterprise Only] `enableConsulNamespaces` indicates that you are running
# Consul Enterprise v1.7+ with a valid Consul Enterprise license and would
# like to make use of configuration beyond registering everything into
# the `default` Consul namespace. Requires consul-k8s v0.12+. Additional configuration
# options are found in the `consulNamespaces` section of both the catalog sync
# and connect injector.
enableConsulNamespaces: false
# Configure ACLs.
acls:
# If true, the Helm chart will automatically manage ACL tokens and policies
# for all Consul and consul-k8s components.
# This requires Consul >= 1.4 and consul-k8s >= 0.14.0.
manageSystemACLs: false
# A Kubernetes secret containing the bootstrap token to use for
# creating policies and tokens for all Consul and consul-k8s components.
# If set, we will skip ACL bootstrapping of the servers and will only
# initialize ACLs for the Consul clients and consul-k8s system components.
# Requires consul-k8s >= 0.14.0.
bootstrapToken:
# The name of the Kubernetes secret.
secretName: null
# The key of the Kubernetes secret.
secretKey: null
# If true, an ACL token will be created that can be used in secondary
# datacenters for replication. This should only be set to true in the
# primary datacenter since the replication token must be created from that
# datacenter.
# In secondary datacenters, the secret needs to be imported from the primary
# datacenter and referenced via `global.acls.replicationToken`.
# Requires consul-k8s >= 0.13.0.
createReplicationToken: false
# replicationToken references a secret containing the replication ACL token.
# This token will be used by secondary datacenters to perform ACL replication
# and create ACL tokens and policies.
# This value is ignored if `bootstrapToken` is also set.
# Requires consul-k8s >= 0.13.0.
replicationToken:
# The name of the Kubernetes secret.
secretName: null
# The key of the Kubernetes secret.
secretKey: null
# Configure federation.
federation:
# If enabled, this datacenter will be federation-capable. Only federation
# via mesh gateways is supported.
# Mesh gateways and servers will be configured to allow federation.
# Requires `global.tls.enabled`, `meshGateway.enabled` and `connectInject.enabled`
# to be true. Requires Consul 1.8+.
enabled: false
# If true, the chart will create a Kubernetes secret that can be imported
# into secondary datacenters so they can federate with this datacenter. The
# secret contains all the information secondary datacenters need to contact
# and authenticate with this datacenter. This should only be set to true
# in your primary datacenter. The secret name is
# `<global.name>-federation` (if setting `global.name`), otherwise
# `<helm-release-name>-consul-federation`. Requires consul-k8s 0.15.0+.
createFederationSecret: false
# Configures metrics for Consul service mesh
metrics:
# Configures the Helm chart’s components
# to expose Prometheus metrics for the Consul service mesh. By default
# this includes gateway metrics and sidecar metrics.
# @type: boolean
enabled: false
# Configures consul agent metrics. Only applicable if
# `global.metrics.enabled` is true.
# @type: boolean
enableAgentMetrics: false
# Configures the retention time for metrics in Consul clients and
# servers. This must be greater than 0 for Consul clients and servers
# to expose any metrics at all.
# Only applicable if `global.metrics.enabled` is true.
# @type: string
agentMetricsRetentionTime: 1m
# If true, mesh, terminating, and ingress gateways will expose their
# Envoy metrics on port `20200` at the `/metrics` path and all gateway pods
# will have Prometheus scrape annotations. Only applicable if `global.metrics.enabled` is true.
# @type: boolean
enableGatewayMetrics: true
# For connect-injected pods, the consul sidecar is responsible for metrics merging. For ingress/mesh/terminating
# gateways, it additionally ensures the Consul services are always registered with their local Consul client.
# @recurse: false
# @type: map
consulSidecarContainer:
resources:
requests:
memory: "25Mi"
cpu: "20m"
limits:
memory: "50Mi"
cpu: "20m"
# The name (and tag) of the Envoy Docker image used for the
# connect-injected sidecar proxies and mesh, terminating, and ingress gateways.
# See https://www.consul.io/docs/connect/proxies/envoy for full compatibility matrix between Consul and Envoy.
# @default: envoyproxy/envoy-alpine:<latest supported version>
imageEnvoy: "envoyproxy/envoy-alpine:v1.18.3"
# Configuration for running this Helm chart on the Red Hat OpenShift platform.
# This Helm chart currently supports OpenShift v4.x+.
openshift:
# If true, the Helm chart will create necessary configuration for running
# its components on OpenShift.
enabled: false
# Server, when enabled, configures a server cluster to run. This should
# be disabled if you plan on connecting to a Consul cluster external to
# the Kube cluster.
server:
# If true, the chart will install all the resources necessary for a
# Consul server cluster. If you're running Consul externally and want agents
# within Kubernetes to join that cluster, this should probably be false.
# @default: global.enabled
# @type: boolean
enabled: "-"
# The name of the Docker image (including any tag) for the containers running
# Consul server agents.
# @type: string
image: null
# The number of server agents to run. This determines the fault tolerance of
# the cluster. Please see the deployment table (https://consul.io/docs/internals/consensus#deployment-table)
# for more information.
replicas: 3
# The number of servers that are expected to be running.
# It defaults to server.replicas.
# In most cases the default should be used, however if there are more
# servers in this datacenter than server.replicas it might make sense
# to override the default. This would be the case if two kube clusters
# were joined into the same datacenter and each cluster ran a certain number
# of servers.
# @type: int
bootstrapExpect: null
# [Enterprise Only] This value refers to a Kubernetes secret that you have created
# that contains your enterprise license. It is required if you are using an
# enterprise binary. Defining it here applies it to your cluster once a leader
# has been elected. If you are not using an enterprise image or if you plan to
# introduce the license key via another route, then set these fields to null.
# Note: the job to apply license runs on both Helm installs and upgrades.
enterpriseLicense:
# The name of the Kubernetes secret that holds the enterprise license.
# The secret must be in the same namespace that Consul is installed into.
secretName: null
# The key within the Kubernetes secret that holds the enterprise license.
secretKey: null
# Manages license autoload. Required in Consul 1.10.0+, 1.9.7+ and 1.8.12+.
enableLicenseAutoload: true
# A Kubernetes secret containing a certificate & key for the server agents to use
# for TLS communication within the Consul cluster. Cert needs to be provided with
# additional DNS name SANs so that it will work within the Kubernetes cluster:
#
# ```bash
# consul tls cert create -server -days=730 -domain=consul -ca=consul-agent-ca.pem \
# -key=consul-agent-ca-key.pem -dc={{datacenter}} \
# -additional-dnsname="{{fullname}}-server" \
# -additional-dnsname="*.{{fullname}}-server" \
# -additional-dnsname="*.{{fullname}}-server.{{namespace}}" \
# -additional-dnsname="*.{{fullname}}-server.{{namespace}}.svc" \
# -additional-dnsname="*.server.{{datacenter}}.{{domain}}" \
# -additional-dnsname="server.{{datacenter}}.{{domain}}"
# ```
#
# If you have generated the
# server-cert yourself with the consul CLI, you could use the following command
# to create the secret in Kubernetes:
#
# ```bash
# kubectl create secret generic consul-server-cert \
# --from-file='tls.crt=./dc1-server-consul-0.pem'
# --from-file='tls.key=./dc1-server-consul-0-key.pem'
# ```
serverCert:
# The name of the Kubernetes secret.
secretName: null
# Exposes the servers' gossip and RPC ports as hostPorts. To enable a client
# agent outside of the k8s cluster to join the datacenter, you would need to
# enable `server.exposeGossipAndRPCPorts`, `client.exposeGossipPorts`, and
# set `server.ports.serflan.port` to a port not being used on the host. Since
# `client.exposeGossipPorts` uses the hostPort 8301,
# `server.ports.serflan.port` must be set to something other than 8301.
exposeGossipAndRPCPorts: false
# Configures ports for the consul servers.
ports:
# Configures the LAN gossip port for the consul servers. If you choose to
# enable `server.exposeGossipAndRPCPorts` and `client.exposeGossipPorts`,
# that will configure the LAN gossip ports on the servers and clients to be
# hostPorts, so if you are running clients and servers on the same node the
# ports will conflict if they are both 8301. When you enable
# `server.exposeGossipAndRPCPorts` and `client.exposeGossipPorts`, you must
# change this from the default to an unused port on the host, e.g. 9301. By
# default the LAN gossip port is 8301 and configured as a containerPort on
# the consul server Pods.
serflan:
port: 8301
# This defines the disk size for configuring the
# servers' StatefulSet storage. For dynamically provisioned storage classes, this is the
# desired size. For manually defined persistent volumes, this should be set to
# the disk size of the attached volume.
storage: 10Gi
# The StorageClass to use for the servers' StatefulSet storage. It must be
# able to be dynamically provisioned if you want the storage
# to be automatically created. For example, to use local
# (https://kubernetes.io/docs/concepts/storage/storage-classes/#local)
# storage classes, the PersistentVolumeClaims would need to be manually created.
# A `null` value will use the Kubernetes cluster's default StorageClass. If a default
# StorageClass does not exist, you will need to create one.
# @type: string
storageClass: null
# This will enable/disable Connect (https://consul.io/docs/connect). Setting this to true
# _will not_ automatically secure pod communication, this
# setting will only enable usage of the feature. Consul will automatically initialize
# a new CA and set of certificates. Additional Connect settings can be configured
# by setting the `server.extraConfig` value.
connect: true
serviceAccount:
# This value defines additional annotations for the server service account. This should be formatted as a multi-line
# string.
#
# ```yaml
# annotations: |
# "sample/annotation1": "foo"
# "sample/annotation2": "bar"
# ```
#
# @type: string
annotations: null
# The resource requests (CPU, memory, etc.)
# for each of the server agents. This should be a YAML map corresponding to a Kubernetes
# ResourceRequirements (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#resourcerequirements-v1-core)
# object. NOTE: The use of a YAML string is deprecated.
#
# Example:
#
# ```yaml
# resources:
# requests:
# memory: '100Mi'
# cpu: '100m'
# limits:
# memory: '100Mi'
# cpu: '100m'
# ```
#
# @recurse: false
# @type: map
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "100Mi"
cpu: "100m"
# The security context for the server pods. This should be a YAML map corresponding to a
# Kubernetes [SecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) object.
# By default, servers will run as non-root, with user ID `100` and group ID `1000`,
# which correspond to the consul user and group created by the Consul docker image.
# Note: if running on OpenShift, this setting is ignored because the user and group are set automatically
# by the OpenShift platform.
# @type: map
# @recurse: false
securityContext:
runAsNonRoot: true
runAsGroup: 1000
runAsUser: 100
fsGroup: 1000
# This value is used to carefully
# control a rolling update of Consul server agents. This value specifies the
# partition (https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions)
# for performing a rolling update. Please read the linked Kubernetes documentation
# and https://www.consul.io/docs/k8s/upgrade#upgrading-consul-servers for more information.
updatePartition: 0
# This configures the PodDisruptionBudget (https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
# for the server cluster.
disruptionBudget:
# This will enable/disable registering a PodDisruptionBudget for the server
# cluster. If this is enabled, it will only register the budget so long as
# the server cluster is enabled.
enabled: true
# The maximum number of unavailable pods. By default, this will be
# automatically computed based on the `server.replicas` value to be `(n/2)-1`.
# If you need to set this to `0`, you will need to add a
# --set 'server.disruptionBudget.maxUnavailable=0'` flag to the helm chart installation
# command because of a limitation in the Helm templating language.
# @type: integer
maxUnavailable: null
# A raw string of extra JSON configuration (https://consul.io/docs/agent/options) for Consul
# servers. This will be saved as-is into a ConfigMap that is read by the Consul
# server agents. This can be used to add additional configuration that
# isn't directly exposed by the chart.
#
# Example:
#
# ```yaml
# extraConfig: |
# {
# "log_level": "DEBUG"
# }
# ```
#
# This can also be set using Helm's `--set` flag using the following syntax:
#
# ```shell
# --set 'server.extraConfig="{"log_level": "DEBUG"}"'
# ```
extraConfig: |
{}
# A list of extra volumes to mount for server agents. This
# is useful for bringing in extra data that can be referenced by other configurations
# at a well known path, such as TLS certificates or Gossip encryption keys. The
# value of this should be a list of objects.
#
# Example:
#
# ```yaml
# extraVolumes:
# - type: secret
# name: consul-certs
# load: false
# ```
#
# Each object supports the following keys:
#
# - `type` - Type of the volume, must be one of "configMap" or "secret". Case sensitive.
#
# - `name` - Name of the configMap or secret to be mounted. This also controls
# the path that it is mounted to. The volume will be mounted to `/consul/userconfig/<name>`.
#
# - `load` - If true, then the agent will be
# configured to automatically load HCL/JSON configuration files from this volume
# with `-config-dir`. This defaults to false.
#
# @type: array<map>
extraVolumes: []
# This value defines the affinity (https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity)
# for server pods. It defaults to allowing only a single server pod on each node, which
# minimizes risk of the cluster becoming unusable if a node is lost. If you need
# to run more pods per node (for example, testing on Minikube), set this value
# to `null`.
#
# Example:
#
# ```yaml
# affinity: |
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchLabels:
# app: {{ template "consul.name" . }}
# release: "{{ .Release.Name }}"
# component: server
# topologyKey: kubernetes.io/hostname
# ```
affinity: |
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: {{ template "consul.name" . }}
release: "{{ .Release.Name }}"
component: server
topologyKey: kubernetes.io/hostname
# Toleration settings for server pods. This
# should be a multi-line string matching the Tolerations
# (https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) array in a Pod spec.
tolerations: ""
# Pod topology spread constraints for server pods.
# This should be a multi-line YAML string matching the `topologySpreadConstraints` array
# (https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) in a Pod Spec.
#
# This requires K8S >= 1.18 (beta) or 1.19 (stable).
#
# Example:
#
# ```yaml
# topologySpreadConstraints: |
# - maxSkew: 1
# topologyKey: topology.kubernetes.io/zone
# whenUnsatisfiable: DoNotSchedule
# labelSelector:
# matchLabels:
# app: {{ template "consul.name" . }}
# release: "{{ .Release.Name }}"
# component: server
# ```
topologySpreadConstraints: ""
# This value defines `nodeSelector` (https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector)
# labels for server pod assignment, formatted as a multi-line string.
#
# Example:
#
# ```yaml
# nodeSelector: |
# beta.kubernetes.io/arch: amd64
# ```
#
# @type: string
nodeSelector: null
# This value references an existing
# Kubernetes `priorityClassName` (https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#pod-priority)
# that can be assigned to server pods.
priorityClassName: ""
# Extra labels to attach to the server pods. This should be a YAML map.
#
# Example:
#
# ```yaml
# extraLabels:
# labelKey: label-value
# anotherLabelKey: another-label-value
# ```
#
# @type: map
extraLabels: null
# This value defines additional annotations for
# server pods. This should be formatted as a multi-line string.
#
# ```yaml
# annotations: |
# "sample/annotation1": "foo"
# "sample/annotation2": "bar"
# ```
#
# @type: string
annotations: null
# Server service properties.
service:
# Annotations to apply to the server service.
#
# ```yaml
# annotations: |
# "annotation-key": "annotation-value"
# ```
#
# @type: string
annotations: null
# A list of extra environment variables to set within the stateful set.
# These could be used to include proxy settings required for cloud auto-join
# feature, in case kubernetes cluster is behind egress http proxies. Additionally,
# it could be used to configure custom consul parameters.
# @type: map
extraEnvironmentVars: {}
# Configuration for Consul servers when the servers are running outside of Kubernetes.
# When running external servers, configuring these values is recommended
# if setting `global.tls.enableAutoEncrypt` to true (requires consul-k8s >= 0.13.0)
# or `global.acls.manageSystemACLs` to true (requires consul-k8s >= 0.14.0).
externalServers:
# If true, the Helm chart will be configured to talk to the external servers.
# If setting this to true, you must also set `server.enabled` to false.
enabled: false
# An array of external Consul server hosts that are used to make
# HTTPS connections from the components in this Helm chart.
# Valid values include IPs, DNS names, or Cloud auto-join string.
# The port must be provided separately below.
# Note: `client.join` must also be set to the hosts that should be
# used to join the cluster. In most cases, the `client.join` values
# should be the same, however, they may be different if you
# wish to use separate hosts for the HTTPS connections.
# @type: array<string>
hosts: []
# The HTTPS port of the Consul servers.
httpsPort: 8501
# The server name to use as the SNI host header when connecting with HTTPS.
# @type: string
tlsServerName: null
# If true, consul-k8s components will ignore the CA set in
# `global.tls.caCert` when making HTTPS calls to Consul servers and
# will instead use the consul-k8s image's system CAs for TLS verification.
# If false, consul-k8s components will use `global.tls.caCert` when
# making HTTPS calls to Consul servers.
# **NOTE:** This does not affect Consul's internal RPC communication which will
# always use `global.tls.caCert`.
useSystemRoots: false
# If you are setting `global.acls.manageSystemACLs` and
# `connectInject.enabled` to true, set `k8sAuthMethodHost` to the address of the Kubernetes API server.
# This address must be reachable from the Consul servers.
# Please see the Kubernetes Auth Method documentation (https://consul.io/docs/acl/auth-methods/kubernetes).
# Requires consul-k8s >= 0.14.0.
#
# You could retrieve this value from your `kubeconfig` by running:
#
# ```shell
# kubectl config view \
# -o jsonpath="{.clusters[?(@.name=='<your cluster name>')].cluster.server}"
# ```
#
# @type: string
k8sAuthMethodHost: null
# Values that configure running a Consul client on Kubernetes nodes.
client:
# If true, the chart will install all
# the resources necessary for a Consul client on every Kubernetes node. This _does not_ require
# `server.enabled`, since the agents can be configured to join an external cluster.
# @default: global.enabled
# @type: boolean
enabled: "-"
# The name of the Docker image (including any tag) for the containers
# running Consul client agents.
# @type: string
image: null
# A list of valid `-retry-join` values (https://consul.io/docs/agent/options#retry-join).
# If this is `null` (default), then the clients will attempt to automatically
# join the server cluster running within Kubernetes.
# This means that with `server.enabled` set to true, clients will automatically
# join that cluster. If `server.enabled` is not true, then a value must be
# specified so the clients can join a valid cluster.
# @type: array<string>
join: null
# An absolute path to a directory on the host machine to use as the Consul
# client data directory. If set to the empty string or null, the Consul agent
# will store its data in the Pod's local filesystem (which will
# be lost if the Pod is deleted). Security Warning: If setting this, Pod Security
# Policies _must_ be enabled on your cluster and in this Helm chart (via the
# `global.enablePodSecurityPolicies` setting) to prevent other pods from
# mounting the same host path and gaining access to all of Consul's data.
# Consul's data is not encrypted at rest.
# @type: string
dataDirectoryHostPath: null
# If true, agents will enable their GRPC listener on
# port 8502 and expose it to the host. This will use slightly more resources, but is
# required for Connect.
grpc: true
# nodeMeta specifies an arbitrary metadata key/value pair to associate with the node
# (see https://www.consul.io/docs/agent/options.html#_node_meta)
nodeMeta:
pod-name: ${HOSTNAME}
host-ip: ${HOST_IP}
# If true, the Helm chart will expose the clients' gossip ports as hostPorts.
# This is only necessary if pod IPs in the k8s cluster are not directly routable
# and the Consul servers are outside of the k8s cluster.
# This also changes the clients' advertised IP to the `hostIP` rather than `podIP`.
exposeGossipPorts: false
serviceAccount:
# This value defines additional annotations for the client service account. This should be formatted as a multi-line
# string.
#
# ```yaml
# annotations: |
# "sample/annotation1": "foo"
# "sample/annotation2": "bar"
# ```
#
# @type: string
annotations: null
# Resource settings for Client agents.
# NOTE: The use of a YAML string is deprecated. Instead, set directly as a
# YAML map.
# @recurse: false
# @type: map
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "100Mi"
cpu: "100m"
# The security context for the client pods. This should be a YAML map corresponding to a
# Kubernetes [SecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) object.
# By default, servers will run as non-root, with user ID `100` and group ID `1000`,
# which correspond to the consul user and group created by the Consul docker image.
# Note: if running on OpenShift, this setting is ignored because the user and group are set automatically
# by the OpenShift platform.
# @type: map
# @recurse: false
securityContext:
runAsNonRoot: true
runAsGroup: 1000
runAsUser: 100
fsGroup: 1000
# A raw string of extra JSON configuration (https://consul.io/docs/agent/options) for Consul
# clients. This will be saved as-is into a ConfigMap that is read by the Consul
# client agents. This can be used to add additional configuration that
# isn't directly exposed by the chart.
#
# Example:
#
# ```yaml
# extraConfig: |
# {
# "log_level": "DEBUG"
# }
# ```
#
# This can also be set using Helm's `--set` flag using the following syntax:
#
# ```shell
# --set 'client.extraConfig="{"log_level": "DEBUG"}"'
# ```
extraConfig: |
{}
# A list of extra volumes to mount for client agents. This
# is useful for bringing in extra data that can be referenced by other configurations
# at a well known path, such as TLS certificates or Gossip encryption keys. The
# value of this should be a list of objects.
#
# Example:
#
# ```yaml
# extraVolumes:
# - type: secret
# name: consul-certs
# load: false
# ```
#
# Each object supports the following keys:
#
# - `type` - Type of the volume, must be one of "configMap" or "secret". Case sensitive.
#
# - `name` - Name of the configMap or secret to be mounted. This also controls
# the path that it is mounted to. The volume will be mounted to `/consul/userconfig/<name>`.
#
# - `load` - If true, then the agent will be
# configured to automatically load HCL/JSON configuration files from this volume
# with `-config-dir`. This defaults to false.
#
# @type: array<map>
extraVolumes: []
# Toleration Settings for Client pods
# This should be a multi-line string matching the Toleration array
# in a PodSpec.
# The example below will allow Client pods to run on every node
# regardless of taints
#
# ```yaml
# tolerations: |
# - operator: Exists
# ```
tolerations: ""
# nodeSelector labels for client pod assignment, formatted as a multi-line string.
# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
#
# Example:
#
# ```yaml
# nodeSelector: |
# beta.kubernetes.io/arch: amd64
# ```
# @type: string
nodeSelector: null
# Affinity Settings for Client pods, formatted as a multi-line YAML string.
# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
#
# Example:
#
# ```yaml
# affinity: |
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: node-role.kubernetes.io/master
# operator: DoesNotExist
# ```
# @type: string
affinity: null
# This value references an existing
# Kubernetes `priorityClassName` (https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#pod-priority)
# that can be assigned to client pods.
priorityClassName: ""
# This value defines additional annotations for
# client pods. This should be formatted as a multi-line string.
#
# ```yaml
# annotations: |
# "sample/annotation1": "foo"
# "sample/annotation2": "bar"
# ```
#
# @type: string
annotations: null
# Extra labels to attach to the client pods. This should be a regular YAML map.
#
# Example:
#
# ```yaml
# extraLabels:
# labelKey: label-value
# anotherLabelKey: another-label-value
# ```
#
# @type: map
extraLabels: null
# A list of extra environment variables to set within the stateful set.
# These could be used to include proxy settings required for cloud auto-join
# feature, in case kubernetes cluster is behind egress http proxies. Additionally,
# it could be used to configure custom consul parameters.
# @type: map
extraEnvironmentVars: {}
# This value defines the Pod DNS policy (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy)
# for client pods to use.
# @type: string
dnsPolicy: null
# hostNetwork defines whether or not we use host networking instead of hostPort in the event
# that a CNI plugin doesn't support `hostPort`. This has security implications and is not recommended
# as doing so gives the consul client unnecessary access to all network traffic on the host.
# In most cases, pod network and host network are on different networks so this should be
# combined with `dnsPolicy: ClusterFirstWithHostNet`
hostNetwork: false
# updateStrategy for the DaemonSet.
# See https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy.
# This should be a multi-line string mapping directly to the updateStrategy
#
# Example:
#
# ```yaml
# updateStrategy: |
# rollingUpdate:
# maxUnavailable: 5
# type: RollingUpdate
# ```
#
# @type: string
updateStrategy: null
# [Enterprise Only] Values for setting up and running snapshot agents
# (https://consul.io/commands/snapshot/agent)
# within the Consul clusters. They are required to be co-located with Consul clients,
# so will inherit the clients' nodeSelector, tolerations and affinity.
snapshotAgent:
# If true, the chart will install resources necessary to run the snapshot agent.
enabled: false
# The number of snapshot agents to run.
replicas: 2
# A Kubernetes secret that should be manually created to contain the entire
# config to be used on the snapshot agent.
# This is the preferred method of configuration since there are usually storage
# credentials present. Please see Snapshot agent config (https://consul.io/commands/snapshot/agent#config-file-options)
# for details.
configSecret:
# The name of the Kubernetes secret.
secretName: null
# The key of the Kubernetes secret.
secretKey: null
serviceAccount:
# This value defines additional annotations for the snapshot agent service account. This should be formatted as a
# multi-line string.
#
# ```yaml
# annotations: |
# "sample/annotation1": "foo"
# "sample/annotation2": "bar"
# ```
#
# @type: string
annotations: null
# Resource settings for snapshot agent pods.
# @recurse: false
# @type: map