crossplane-contrib / provider-in-cluster

@crossplane provider for in-cluster resources
Apache License 2.0
10 stars 4 forks source link

Enable leader election for controller manager #2

Closed khos2ow closed 3 years ago

khos2ow commented 4 years ago

This PR enables leader election for in-cluster provider controller manager. This can be controlled by --leader-election CLI flag or LEADER_ELECTION=true environment variables. This can be achieved for deployment by applying the following:

apiVersion: pkg.crossplane.io/v1alpha1
kind: ControllerConfig
metadata:
  name: in-cluster-config
spec:
  replicas: 2
  env:
    - name: "LEADER_ELECTION"
      value: "true"

Non-blocker fix for https://github.com/crossplane/crossplane/issues/5