Support break-glass scenario that disable reconcile and drift detection
In case of break-glass scenario (being required to operate directly on managed resources outside of GitOps flow) we need an option to mark an object as disabled. Disabled object will not be reconciled (even when a change in GitRepository is detected) and will output an error if tfctl reconcile command will attempt to force reconcile it.
If a drift detection flow is operations, it will skip checking this object as a drift is created by the scenario itself.
This can probably be achieved in
- Via annotations: e.g.
terraform/disabled: true - Via
spec.disabledproperty
When marking a deployment as disabled, it will be possible to write MutatingWebhooks that will enforce company policies for break glass (e.g. no longer than 72 hours)
We have a feature to suspend and resume reconciliation similar to other Flux objects. https://github.com/weaveworks/tf-controller/blob/main/controllers/terraform_controller.go#L137