feat(local): label hops provider install resources so doctor distinguishes intentional installs#54
Conversation
…they're intentional `hops provider install` now stamps `app.kubernetes.io/managed-by: hops-provider-install` on the Provider, DeploymentRuntimeConfig, and ClusterRoleBinding it manages. A custom install (e.g. a forked provider built from source) uses the `<provider>-runtime` DRC convention rather than the bootstrap `local-dev-<provider>` DRC, which `hops local doctor` previously reported as drift. `hops local doctor` now reads that label: a labeled provider is checked against the install convention (`<provider>-runtime` DRC, `<provider>-cluster-admin` binding, SA `<provider>`) and reported as a "custom install" with its package, instead of false drift — while still verifying cluster-admin and still flagging real drift (runtimeConfigRef=default / missing cluster-admin) in both modes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 7 minutes and 19 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Follow-up to #53.
hops local doctorflagged a custom-installed provider (e.g.hops provider install --repo jonasz-lasut/provider-helm, a fork built from source) as "drift" because it uses the<provider>-runtimeDRC convention rather than the bootstraplocal-dev-<provider>DRC. That's an intentional install, not drift — doctor just had no way to tell.This labels what
hops provider installcreates so doctor can distinguish intent.Changes
hops provider installnow stampsapp.kubernetes.io/managed-by: hops-provider-installon the Provider, DeploymentRuntimeConfig, and ClusterRoleBinding it manages (shared consts inlocal/mod.rs).hops local doctorreads that label:<provider>-runtimeDRC,<provider>-cluster-adminbinding, SA<provider>) and reportsinstall mode — custom install via hops provider install (package: …)local-dev-<provider>convention (unchanged)runtimeConfigRef=default/ missing cluster-admin) in both modes.Verification
cargo buildclean ·cargo test86 passed (incl. new label assertions on the 3build_*YAML builders) · new code clippy-cleaninstall mode — bootstrap(all ✓); a labeled provider-helm →install mode — custom install via hops provider install (package: …provider-helm:v1.999.1)(all ✓); the previously-false drift is gone, exit 0apply_provider_resources, label plumbing soundExisting custom installs predating this are unlabeled; a re-run of
hops provider installlabels them (orkubectl labelonce).🤖 Generated with Claude Code