forked from hashicorp/consul-k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
values.yaml
2990 lines (2674 loc) · 111 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://www.consul.io/docs/agent/config/cli-flags#_domain)) and the domain services synced from
# Consul into Kubernetes will have, e.g. `service-name.service.consul`.
domain: consul
# [Experimental] Configures the Cluster Peering feature. Requires Consul v1.13+ and Consul-K8s v0.45+.
peering:
# If true, the Helm chart enables Cluster Peering for the cluster. This option enables peering controllers and
# allows use of the PeeringAcceptor and PeeringDialer CRDs for establishing service mesh peerings.
enabled: false
tokenGeneration:
serverAddresses:
# Source can be set to "","consul" or "static".
#
# "" is the default source. If servers are enabled, it will check if `server.exposeService` is enabled, and read
# the addresses from that service to use as the peering token server addresses.
#
# "consul" will use the Consul advertise addresses in the peering token.
#
# "static" will use the addresses specified in `global.peering.tokenGeneration.serverAddresses.static`.
source: ""
# Static addresses must be formatted "hostname|ip:port" where the port is the Consul server(s)' grpc port.
# @type: array<string>
static: []
# [Enterprise Only] Enabling `adminPartitions` allows creation of Admin Partitions in Kubernetes clusters.
# It additionally indicates that you are running Consul Enterprise v1.11+ with a valid Consul Enterprise
# license. Admin partitions enables deploying services across partitions, while sharing
# a set of Consul servers.
adminPartitions:
# If true, the Helm chart will enable Admin Partitions for the cluster. The clients in the server cluster
# must be installed in the default partition. Creation of Admin Partitions is only supported during installation.
# Admin Partitions cannot be installed via a Helm upgrade operation. Only Helm installs are supported.
enabled: false
# The name of the Admin Partition. The partition name cannot be modified once the partition has been installed.
# Changing the partition name would require an un-install and a re-install with the updated name.
# Must be "default" in the server cluster ie the Kubernetes cluster that the Consul server pods are deployed onto.
name: "default"
# Partition service properties.
service:
type: LoadBalancer
# Optionally set the nodePort value of the partition service if using a NodePort service.
# If not set and using a NodePort service, Kubernetes will automatically assign
# a port.
nodePort:
# RPC node port
# @type: integer
rpc: null
# Serf node port
# @type: integer
serf: null
# HTTPS node port
# @type: integer
https: null
# Annotations to apply to the partition service.
#
# ```yaml
# annotations: |
# "annotation-key": "annotation-value"
# ```
#
# @type: string
annotations: null
# 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.12.3"
# 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-control-plane 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-control-plane Docker
# image that is used for functionality such as catalog sync.
# This can be overridden per component.
# @default: hashicorp/consul-k8s-control-plane:<latest version>
imageK8S: hashicorp/consul-k8s-control-plane:0.46.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
# secretsBackend is used to configure Vault as the secrets backend for the Consul on Kubernetes installation.
# The Vault cluster needs to have the Kubernetes Auth Method, KV2 and PKI secrets engines enabled
# and have necessary secrets, policies and roles created prior to installing Consul.
# See https://www.consul.io/docs/k8s/installation/vault for full instructions.
#
# The Vault cluster _must_ not have the Consul cluster installed by this Helm chart as its storage backend
# as that would cause a circular dependency.
# Vault can have Consul as its storage backend as long as that Consul cluster is not running on this Kubernetes cluster
# and is being managed separately from this Helm installation.
#
# Note: When using Vault KV2 secrets engines the "data" field is implicitly required for Vault API calls,
# secretName should be in the form of "vault-kv2-mount-path/data/secret-name".
# secretKey should be in the form of "key".
secretsBackend:
vault:
# Enabling the Vault secrets backend will replace Kubernetes secrets with referenced Vault secrets.
enabled: false
# The Vault role for the Consul server.
# The role must be connected to the Consul server's service account.
# The role must also have a policy with read capabilities for the following secrets:
# - gossip encryption key defined by the `global.gossipEncryption.secretName` value
# - certificate issue path defined by the `server.serverCert.secretName` value
# - CA certificate defined by the `global.tls.caCert.secretName` value
# - replication token defined by the `global.acls.replicationToken.secretName` value if `global.federation.enabled` is `true`
# To discover the service account name of the Consul server, run
# ```shell-session
# $ helm template --show-only templates/server-serviceaccount.yaml <release-name> hashicorp/consul
# ```
# and check the name of `metadata.name`.
consulServerRole: ""
# The Vault role for the Consul client.
# The role must be connected to the Consul client's service account.
# The role must also have a policy with read capabilities for the gossip encryption
# key defined by the `global.gossipEncryption.secretName` value.
# To discover the service account name of the Consul client, run
# ```shell-session
# $ helm template --show-only templates/client-serviceaccount.yaml <release-name> hashicorp/consul
# ```
# and check the name of `metadata.name`.
consulClientRole: ""
# [Enterprise Only] The Vault role for the Consul client snapshot agent.
# The role must be connected to the Consul client snapshot agent's service account.
# The role must also have a policy with read capabilities for the snapshot agent config
# defined by the `client.snapshotAgent.configSecret.secretName` value.
# To discover the service account name of the Consul client, run
# ```shell-session
# $ helm template --show-only templates/client-snapshot-agent-serviceaccount.yaml --set client.snapshotAgent.enabled=true <release-name> hashicorp/consul
# ```
# and check the name of `metadata.name`.
consulSnapshotAgentRole: ""
# A Vault role for the Consul `server-acl-init` job, which manages setting ACLs so that clients and components can obtain ACL tokens.
# The role must be connected to the `server-acl-init` job's service account.
# The role must also have a policy with read and write capabilities for the bootstrap, replication or partition tokens
# To discover the service account name of the `server-acl-init` job, run
# ```shell-session
# $ helm template --show-only templates/server-acl-init-serviceaccount.yaml \
# --set global.acls.manageSystemACLs=true <release-name> hashicorp/consul
# ```
# and check the name of `metadata.name`.
manageSystemACLsRole: ""
# [Enterprise Only] A Vault role that allows the Consul `partition-init` job to read a Vault secret for the partition ACL token.
# The `partition-init` job bootstraps Admin Partitions on Consul servers.
# .
# This role must be bound the `partition-init` job's service account.
# To discover the service account name of the `partition-init` job, run with Helm values for the client cluster:
# ```shell-session
# $ helm template --show-only templates/partition-init-serviceaccount.yaml -f client-cluster-values.yaml <release-name> hashicorp/consul
# ```
# and check the name of `metadata.name`.
adminPartitionsRole: ""
# The Vault role to read Consul controller's webhook's
# CA and issue a certificate and private key.
# A Vault policy must be created which grants issue capabilities to
# `global.secretsBackend.vault.controller.tlsCert.secretName`.
controllerRole: ""
# The Vault role to read Consul connect-injector webhook's CA
# and issue a certificate and private key.
# A Vault policy must be created which grants issue capabilities to
# `global.secretsBackend.vault.connectInject.tlsCert.secretName`.
connectInjectRole: ""
# The Vault role for all Consul components to read the Consul's server's CA Certificate (unauthenticated).
# The role should be connected to the service accounts of all Consul components, or alternatively `*` since it
# will be used only against the `pki/cert/ca` endpoint which is unauthenticated. A policy must be created which grants
# read capabilities to `global.tls.caCert.secretName`, which is usually `pki/cert/ca`.
consulCARole: ""
# This value defines additional annotations for
# Vault agent on any pods where it'll be running.
# This should be formatted as a multi-line string.
#
# ```yaml
# annotations: |
# "sample/annotation1": "foo"
# "sample/annotation2": "bar"
# ```
#
# @type: string
agentAnnotations: null
# Configuration for Vault server CA certificate. This certificate will be mounted
# to any pod where Vault agent needs to run.
ca:
# The name of the Kubernetes or Vault secret that holds the Vault CA certificate.
# A Kubernetes secret must be in the same namespace that Consul is installed into.
secretName: ""
# The key within the Kubernetes or Vault secret that holds the Vault CA certificate.
secretKey: ""
# Configuration for the Vault Connect CA provider.
# The provider will be configured to use the Vault Kubernetes auth method
# and therefore requires the role provided by `global.secretsBackend.vault.consulServerRole`
# to have permissions to the root and intermediate PKI paths.
# Please see https://www.consul.io/docs/connect/ca/vault#vault-acl-policies
# for information on how to configure the Vault policies.
connectCA:
# The address of the Vault server.
address: ""
# The mount path of the Kubernetes auth method in Vault.
authMethodPath: "kubernetes"
# The path to a PKI secrets engine for the root certificate.
# Please see https://www.consul.io/docs/connect/ca/vault#rootpkipath.
rootPKIPath: ""
# The path to a PKI secrets engine for the generated intermediate certificate.
# Please see https://www.consul.io/docs/connect/ca/vault#intermediatepkipath.
intermediatePKIPath: ""
# Additional Connect CA configuration in JSON format.
# Please see https://www.consul.io/docs/connect/ca/vault#common-ca-config-options
# for additional configuration options.
#
# Example:
#
# ```yaml
# additionalConfig: |
# {
# "connect": [{
# "ca_config": [{
# "leaf_cert_ttl": "36h"
# }]
# }]
# }
# ```
additionalConfig: |
{}
controller:
# Configuration to the Vault Secret that Kubernetes will use on
# Kubernetes CRD creation, deletion, and update, to get TLS certificates
# used issued from vault to send webhooks to the controller.
tlsCert:
# The Vault secret path that issues TLS certificates for controller
# webhooks.
# @type: string
secretName: null
# Configuration to the Vault Secret that Kubernetes will use on
# Kubernetes CRD creation, deletion, and update, to get CA certificates
# used issued from vault to send webhooks to the controller.
caCert:
# The Vault secret path that contains the CA certificate for controller
# webhooks.
# @type: string
secretName: null
connectInject:
# Configuration to the Vault Secret that Kubernetes will use on
# Kubernetes pod creation, deletion, and update, to get CA certificates
# used issued from vault to send webhooks to the ConnectInject.
caCert:
# The Vault secret path that contains the CA certificate for
# Connect Inject webhooks.
# @type: string
secretName: null
# Configuration to the Vault Secret that Kubernetes will use on
# Kubernetes pod creation, deletion, and update, to get TLS certificates
# used issued from vault to send webhooks to the ConnectInject.
tlsCert:
# The Vault secret path that issues TLS certificates for connect
# inject webhooks.
# @type: string
secretName: null
# Configures Consul's gossip encryption key.
# (see `-encrypt` (https://www.consul.io/docs/agent/config/cli-flags#_encrypt)).
# By default, gossip encryption is not enabled. The gossip encryption key may be set automatically or manually.
# The recommended method is to automatically generate the key.
# To automatically generate and set a gossip encryption key, set autoGenerate to true.
# Values for secretName and secretKey should not be set if autoGenerate is true.
# To manually generate a gossip encryption key, set secretName and secretKey and use Consul to generate
# a key, saving this as a Kubernetes secret or Vault secret path and key.
# If `global.secretsBackend.vault.enabled=true`, be sure to add the "data" component of the secretName path as required by
# the Vault KV-2 secrets engine [see example].
#
# ```shell-session
# $ kubectl create secret generic consul-gossip-encryption-key --from-literal=key=$(consul keygen)
# ```
#
# Vault CLI Example:
# ```shell-session
# $ vault kv put consul/secrets/gossip key=$(consul keygen)
# ```
# `gossipEncryption.secretName="consul/data/secrets/gossip"`
# `gossipEncryption.secretKey="key"`
gossipEncryption:
# Automatically generate a gossip encryption key and save it to a Kubernetes or Vault secret.
autoGenerate: false
# The name of the Kubernetes secret or Vault secret path that holds the gossip
# encryption key. A Kubernetes secret must be in the same namespace that Consul is installed into.
secretName: ""
# The key within the Kubernetes secret or Vault secret key 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/config/cli-flags#_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+.
tls:
# If true, the Helm chart will enable TLS for Consul
# servers and clients and all consul-k8s-control-plane 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-control-plane components to retrieve the CA from the servers
# via the API. Requires Consul 1.7.1+.
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` for internal RPC communication 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 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:
#
# ```shell-session
# $ kubectl create secret generic consul-ca-cert \
# --from-file='tls.crt=./consul-agent-ca.pem'
# ```
# If you are using Vault as a secrets backend with TLS, `caCert.secretName` must be provided and should reference
# the CA path for your PKI secrets engine. This should be of the form `pki/cert/ca` where `pki` is the mount point of your PKI secrets engine.
# A read policy must be created and associated with the CA cert path for `global.tls.caCert.secretName`.
# This will be consumed by the `global.secretsBackend.vault.consulCARole` role by all Consul components.
# When using Vault the secretKey is not used.
caCert:
# The name of the Kubernetes or Vault secret that holds the CA certificate.
# @type: string
secretName: null
# The key within the Kubernetes or Vault secret that holds the CA certificate.
# @type: string
secretKey: null
# A Kubernetes or Vault 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:
#
# ```shell-session
# $ 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 or Vault secret that holds the CA key.
# @type: string
secretName: null
# The key within the Kubernetes or Vault secret that holds the CA key.
# @type: string
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. 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-control-plane components.
# This requires Consul >= 1.4.
manageSystemACLs: false
# A Kubernetes or Vault secret containing the bootstrap token to use for
# creating policies and tokens for all Consul and consul-k8s-control-plane components.
# If set, we will skip ACL bootstrapping of the servers and will only
# initialize ACLs for the Consul clients and consul-k8s-control-plane system components.
bootstrapToken:
# The name of the Kubernetes or Vault secret that holds the bootstrap token.
secretName: null
# The key within the Kubernetes or Vault secret that holds the bootstrap token.
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`.
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.
replicationToken:
# The name of the Kubernetes or Vault secret that holds the replication token.
# @type: string
secretName: null
# The key within the Kubernetes or Vault secret that holds the replication token.
# @type: string
secretKey: null
# partitionToken references a Vault secret containing the ACL token to be used in non-default partitions.
# This value should only be provided in the default partition and only when setting
# the `global.secretsBackend.vault.enabled` value to true.
# Consul will use the value of the secret stored in Vault to create an ACL token in Consul with the value of the
# secret as the secretID for the token.
# In non-default, partitions set this secret as the `bootstrapToken`.
partitionToken:
# The name of the Vault secret that holds the partition token.
# @type: string
secretName: null
# The key within the Vault secret that holds the parition token.
# @type: string
secretKey: null
# [Enterprise Only] This value refers to a Kubernetes or Vault 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 or Vault secret that holds the enterprise license.
# A Kubernetes secret must be in the same namespace that Consul is installed into.
# @type: string
secretName: null
# The key within the Kubernetes or Vault secret that holds the enterprise license.
# @type: string
secretKey: null
# Manages license autoload. Required in Consul 1.10.0+, 1.9.7+ and 1.8.12+.
enableLicenseAutoload: true
# 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`.
createFederationSecret: false
# The name of the primary datacenter. This should only be set for datacenters
# that are not the primary datacenter.
# @type: string
primaryDatacenter: null
# A list of addresses of the primary mesh gateways in the form `<ip>:<port>`.
# (e.g. ["1.1.1.1:443", "2.3.4.5:443"]
# @type: array<string>
primaryGateways: []
# If you are setting `global.federation.enabled` to true and are in a secondary datacenter,
# set `k8sAuthMethodHost` to the address of the Kubernetes API server of the secondary datacenter.
# This address must be reachable from the Consul servers in the primary datacenter.
# This auth method will be used to provision ACL tokens for Consul components and is different
# from the one used by the Consul Service Mesh.
# Please see the [Kubernetes Auth Method documentation](https://consul.io/docs/acl/auth-methods/kubernetes).
#
# You can retrieve this value from your `kubeconfig` by running:
#
# ```shell-session
# $ kubectl config view \
# -o jsonpath="{.clusters[?(@.name=='<your cluster name>')].cluster.server}"
# ```
#
# @type: string
k8sAuthMethodHost: null
# 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.
# @type: map
consulSidecarContainer:
# Set default resources for consul sidecar. If null, that resource won't
# be set.
# These settings can be overridden on a per-pod basis via these annotations:
#
# - `consul.hashicorp.com/consul-sidecar-cpu-limit`
# - `consul.hashicorp.com/consul-sidecar-cpu-request`
# - `consul.hashicorp.com/consul-sidecar-memory-limit`
# - `consul.hashicorp.com/consul-sidecar-memory-request`
# @recurse: false
# @type: map
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:v1.23.0"
# 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
# The time in seconds that the consul API client will wait for a response from
# the API before cancelling the request.
consulAPITimeout: 5s
# 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
# A 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:
#
# Kubernetes Secrets backend:
# ```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'
# ```
#
# Vault Secrets backend:
# If you are using Vault as a secrets backend, a Vault Policy must be created which allows `["create", "update"]`
# capabilities on the PKI issuing endpoint, which is usually of the form `pki/issue/consul-server`.
# Please see the following guide for steps to generate a compatible certificate:
# https://learn.hashicorp.com/tutorials/consul/vault-pki-consul-secure-tls
# Note: when using TLS, both the `server.serverCert` and `global.tls.caCert` which points to the CA endpoint of this PKI engine
# must be provided.
serverCert:
# The name of the Vault secret that holds the PEM encoded server certificate.
# @type: string
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.
# See https://www.consul.io/docs/install/performance#read-write-tuning for considerations around choosing a
# performant storage class.
# @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.24/#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
# The container securityContext for each container in the server pods. In
# addition to the Pod's SecurityContext this can
# set the capabilities of processes running in the container and ensure the
# root file systems in the container is read-only.
# @type: map
# @recurse: true
containerSecurityContext:
# The consul server agent container
# @type: map
# @recurse: false
server: null
# 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-session
# --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: []
# A list of sidecar containers.
# Example:
#
# ```yaml
# extraContainers:
# - name: extra-container
# image: example-image:latest
# command:
# - ...
# ```
# @type: array<map>
extraContainers: []
# 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