linkerd2/cli
Alex Leong 2367eea473
Create policy-controller-write Lease at runtime (#10823)
Fixes #10762 

The Linkerd control plane chart contains a Lease resource which is used by the Policy controller to do leader election.  ArgoCD considers Leases to be runtime resources and will not deploy them.  This means that Linkerd will not work for users of ArgoCD.

We remove the policy-controller-write Lease resource from the Helm chart and instead have the policy controller create this resource at startup.  We create it with an `Apply` patch with `resourceVersion="0"`.  This ensures that the Lease resource will only be created if it does not already exist and that if there are multiple replicas of the policy controller starting up at once, only one of them will create the Lease resource.

We also set the `linkerd-destination` Deployment as the owner reference of the Lease resource.  This means that when the `linkerd-destination` Deployment is deleted (for example, when Linkerd is uninstalled) then the Lease will be garbage collected by Kubernetes.

Signed-off-by: Alex Leong <alex@buoyant.io>
2023-04-27 09:59:06 -07:00
..
cmd Create policy-controller-write Lease at runtime (#10823) 2023-04-27 09:59:06 -07:00
flag Introduce LINKERD_DOCKER_REGISTRY and flexibilize CI workflows (#6782) 2021-09-01 13:39:05 -05:00
table Add linkerd viz authz command (#6875) 2021-09-21 09:36:05 -07:00
Dockerfile Update to dev:v39 with Go 1.19 (#10336) 2023-02-16 08:25:42 -08:00
main.go Add `gosec` and `errcheck` lints (#7954) 2022-03-03 10:09:51 -07:00