-
Notifications
You must be signed in to change notification settings - Fork 26
feat: add sync windows #531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #531 +/- ##
==========================================
+ Coverage 43.81% 44.50% +0.69%
==========================================
Files 78 79 +1
Lines 5571 5644 +73
==========================================
+ Hits 2441 2512 +71
- Misses 2922 2923 +1
- Partials 208 209 +1 ☔ View full report in Codecov by Sentry. |
114dfeb to
732f5bf
Compare
732f5bf to
57bf2ed
Compare
cfb703e to
0d9c6e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the sync windows feature for Burrito, allowing users to restrict or permit layer operations (plan/apply) based on defined time windows. The key changes include:
- Adding sync window definitions in manifests, CRDs, and configuration files.
- Implementing sync window logic and tests in the internal syncwindow package and controllers.
- Updating documentation and Helm charts to support and explain the new sync windows feature.
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| mkdocs.yml | Added navigation entry for sync windows documentation (note a typo in the filename). |
| manifests/install.yaml | Added syncWindows field supporting type definitions for cron schedule, duration, layers, and actions. |
| manifests/crds/config.terraform.padok.cloud_terraformrepositories.yaml | Updated CRD to include syncWindows field with similar structure as install manifest. |
| internal/utils/syncwindow/syncwindow.go | Introduced sync window blocking logic based on active deny/allow windows. |
| internal/utils/syncwindow/syncwindow_test.go | Added comprehensive tests for various sync window scenarios. |
| internal/controllers/terraformlayer/states.go | Integrated sync window checks into the plan and apply action flows. |
| internal/controllers/terraformlayer/controller_test.go | Extended tests to cover sync window scenarios in reconciliation. |
| internal/burrito/config/* | Added default sync window configuration support and tests. |
| docs/user-guide/sync-windows.md | Created user guide documentation explaining sync windows usage. |
| deploy/charts/burrito/values.yaml | Added defaultSyncWindows configuration placeholder for Helm deployments. |
| api/v1alpha1/* | Updated CRD definitions and deepcopy methods to support syncWindows. |
Files not reviewed (1)
- go.mod: Language not supported
Comments suppressed due to low confidence (1)
mkdocs.yml:43
- There appears to be a typo in the filename 'additionnal-trigger-path.md'. Consider renaming it to 'additional-trigger-path.md' for consistency.
- user-guide/additionnal-trigger-path.md
This implements Sync Windows to burrito, strongly inspired by ArgoCD's Sync Windows.
Sync Windows enables the user to specify windows during which layers will never by planned or applied (deny windows), or to only plan (or apply) layers during specific windows (allow windows)