feat(openstack-sync-operator): Operator for syncing openstack data as kubernetes custom resources - #2205
Conversation
fbb02c6 to
abb7bba
Compare
52d3579 to
582e234
Compare
Code reviewNice chunk of work here. My goal for the initial commit is a generic shell-operator container with the OpenStack CLI, where watched resources are enrolled through separate charts and adding a hook is easy to follow. Most of the scaffolding is right — the Application shape, the Tracked separately, not this PR: the Framework shape1. Building hooks into the image is right — the docs just contradict it Baking hooks in is what we want: hooks and their Python dependencies version together, CI tests the artifact that ships, and the image tag fully determines behavior. It also matches The problem is that the component doc claims the opposite: understack/docs/deploy-guide/components/openstack-sync-operator.md Lines 112 to 115 in 582e234 while the README correctly documents adding a understack/containers/openstack-sync-operator/README.md Lines 60 to 67 in 582e234 Please make the component doc match the Dockerfile and state the versioning contract explicitly: adding a watched resource requires a new image, and the operator chart is bumped to match. 2. No OpenStack CLI in the image The only dependency is understack/containers/openstack-sync-operator/Dockerfile Lines 17 to 21 in 582e234 3. CRDs belong with the operator; only the CRs live separately A CRD is the API contract of the hook that reads it, so schema and code must version together. Right now the CRD is in the plugin chart at The custom resources then live in their own chart with their own Application, following Side benefit: with CRDs in the operator chart, 4. Drop the convention-based plugin discovery Nothing else in understack/charts/argocd-understack/templates/_helpers.tpl Lines 236 to 257 in 582e234 5. Hook enablement and crontabs belong in the operator chart's values
Those values arrive via Failure case: set Since the image knows its own hooks, put "which hooks are enabled and on what crontab" in the operator chart's own values rather than a ConfigMap authored by a separate chart. That removes the cross-release coupling, makes a 6. Fail loudly when a hook is enabled but not present in Prod pins the image to a hash via the deployment repo's values, so the pinned image and Correctness7. Prune deletes router flavors the operator never created
The second branch infers ownership from a shared object. The PR's own test documents it — understack/python/openstack-sync/tests/test_router_flavors.py Lines 510 to 540 in 582e234 Failure case: someone hand-creates a router flavor against the shared 8. Disabling the plugin deletes every managed flavor
( 9. The operator chart ships no RBAC for its own ServiceAccount
10. A single bad flavor aborts the whole reconcile In Minor: no Housekeeping11. Chart templates should be Every existing Helm chart under understack/.pre-commit-config.yaml Lines 14 to 16 in 582e234 Renaming lets both this and the 12. Drop the understack/components/openstack-sync-operator/values.yaml Lines 3 to 6 in 582e234 Leave Suggested splitLand the framework alone — container, generic chart with the CRDs, plain Application — and move the Neutron router flavors work (CRs, The reconciliation logic is otherwise in reasonable shape, and the service-profile marker scheme in 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
88a6dc8 to
536301a
Compare
Code review — pass 2 (
|
ffe14ab to
1da5d0e
Compare
1da5d0e to
893a4c3
Compare
Code review — pass 3 (
|
f2de26f to
2d2e660
Compare
fabf0ec to
46ed2a3
Compare
46ed2a3 to
0b0ef7a
Compare
Code review — pass 4 (
|
Pass 4 disposition — merging, follow-ups to comeFour items to carry into a follow-on. None block the merge: the framework shape is what I was after, and both 1. The operator doc describes reconciliation that understack/docs/deploy-guide/components/openstack-sync-operator.md Lines 161 to 166 in 0b0ef7a 2. A understack/components/openstack-sync-operator/templates/_helpers.tpl Lines 76 to 85 in 0b0ef7a 3. Both sources of 4. understack/components/openstack-sync-operator/templates/_crd.tpl Lines 7 to 10 in 0b0ef7a Merging as-is and opening a follow-on for these. |
openstack-sync-operator is a shell-operator-based reconciliation system that syncs Kubernetes-defined OpenStack configuration into live OpenStack clouds. It uses a declarative, Helm-driven plugin model where new resource types are defined via:
Full CRUD implementation of neutron router flavors are implemented in feat(openstack-sync-plugins): neutron router flavor - #2217