Skip to content

E8-S03: PublicNetwork CRD and observe-only controller - #32

Merged
konih merged 6 commits into
mainfrom
e8-s03-publicnetwork
Jul 28, 2026
Merged

E8-S03: PublicNetwork CRD and observe-only controller#32
konih merged 6 commits into
mainfrom
e8-s03-publicnetwork

Conversation

@konih

@konih konih commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New PublicNetwork CRD (cluster + namespaced) for gridscale account public network details
  • Observe-only controller: GET /objects/networks, filter network_type=="public"
  • Unit tests: found/not-found/empty/observe-only error cases
  • Reuses gridscale_http.go from E8-S02 (merged)
  • Deprecated API fixes applied: WithExternalConnector, GetEventRecorder nolint, o.Gate

Gate results

All gates pass: go build, go vet, unit tests (5 cases), CRD YAML gate script

Note on zz_generated files

zz_generated.managed.go, zz_generated.managedlist.go, and zz_generated.deepcopy.go regenerated via angryjet + controller-gen to include PublicNetwork. These match make generate output.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

konih added 4 commits July 28, 2026 22:07
…ntinel E8-S03

- Add var errObserveOnly sentinel in both cluster and namespaced controllers
- Update Create/Update to return the sentinel (enables errors.Is assertions)
- Remove dead errNoPublicNetwork constant from cluster controller
- Rename controller_test.go -> publicnetwork_test.go in cluster package
- Add publicnetwork_test.go to namespaced package (was missing)
- Fix import grouping in test files (stdlib / k8s / PlatformRelay)
- All tests use errors.Is(err, errObserveOnly) for precise assertions
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
60.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@konih
konih merged commit a1dfc0c into main Jul 28, 2026
16 of 17 checks passed
@konih
konih deleted the e8-s03-publicnetwork branch July 28, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant