consul-k8s icon indicating copy to clipboard operation
consul-k8s copied to clipboard

Add tolerations to init job templates

Open L1ghtman2k opened this issue 1 year ago • 1 comments

Changes proposed in this PR

  • Add the ability to specify tolerations for tls-init-job, tls-init-cleanup-job, and gossip-encryption-autogenerate-job.
  • Add associated unit tests.
  • Currently, these initialization jobs will get stuck in a 'Pending' state if all nodes in the default namespace have NoSchedule taints. Specifying tolerations allows the jobs to be scheduled.

How I've tested this PR

  • The template unit tests provided, and those added.
  • Deployment against a private K8s cluster, verifying tolerations on init jobs.

How I expect reviewers to test this PR

  • Configure K8s test cluster with NoSchedule taints on all nodes. Deploy Consul with tls and gossipEncryption enabled, and tolerations defined for both. Inspect init jobs for expected tolerations and ensure they are not stuck in a 'Pending' state.

Checklist

L1ghtman2k avatar Jan 04 '24 20:01 L1ghtman2k

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Jan 04 '24 20:01 hashicorp-cla