How can I automatically temporarily disable synchronization for Terraform deployments managed by Flux (ToFu controller)? #5129
-
Hi Team, How can I automatically temporarily disable synchronization for Terraform deployments managed by Flux (ToFu controller)? I want to disable the sync for my EKS cluster which is created by flux and then want to run the lambda to reduce the worker node during non business hours. Any idea ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You can use a pair of k8s CronJobs: one to |
Beta Was this translation helpful? Give feedback.
-
Hi @matheuscscp Checking on it .... |
Beta Was this translation helpful? Give feedback.
See docs:
https://fluxcd.io/flux/cmd/flux_suspend/
https://fluxcd.io/flux/cmd/flux_resume/
There's one
flux suspend
andflux resume
command for each Flux API.In the k8s
CronJob
you need to use a k8sServiceAccount
that has the required permissions for manipulating the involved Flux objects.