-
Notifications
You must be signed in to change notification settings - Fork 1
scaffolds maintainer-d API and workspaces for kcp #23
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Robert Kielty <[email protected]>
- adopts structural CRDs for maintainer-d APIs via controller-gen and
reference types
- generate concrete APIResourceSchemas/APIExport with apigen and hook
them into Make target
- rename the API group to maintainer-d.cncf.io, updating manifests,
docs and helper scripts accordingly
New/Updated Makefile targets
- make kcp-install
downloads/verifies the matching kcp release tools (kcp, apigen) into ./bin/
Run it once per dev environment—or again when you bump KCP_VERSION.
- make kcp-generate
new workflow hook: it runs controller-gen against apis/... to refresh the CRDs
in config/crd/bases/, then pipes those through apigen to rewrite every
APIResourceSchema plus the APIExport under config/kcp/.
Run it whenever you change Go types, resource annotations, or switch API
group/version so the manifests stay in sync before committing or applying
to kcp.
Signed-off-by: Robert Kielty <[email protected]>
apis/maintainers/v1alpha1/types.go
Outdated
| // +kubebuilder:object:root=true | ||
|
|
||
| // AuditLog is an append-only record for significant maintainer operations. | ||
| type AuditLog struct { |
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.
I don't think this should be in a resource, kcp supports Kubernetes' audit logging capabilities. If we need this data, we should probably craft an audit policy that captures the relevant data in kcp.
apis/maintainers/v1alpha1/types.go
Outdated
| // +kubebuilder:subresource:status | ||
|
|
||
| // ReconciliationResult stores reconciliation findings for audit and follow-up. | ||
| type ReconciliationResult struct { |
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.
Similar note here, I don't think I would store results like this to not overload etcd. It would probably make more sense to store any problems in conditions on the respective object's status subresource.
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.
Thanks for the review feedback! Much appreciated, I'll remove those resources from the workspace.
- drops the AuditLog and ReconciliationResult types, regenerates deep copies - deletes the CRDs and APIResourceSchemas for the removed resources - updates the KCP export, schema version names and Makefile resource list Signed-off-by: Robert Kielty <[email protected]>
Signed-off-by: Robert Kielty <[email protected]>
Signed-off-by: Robert Kielty <[email protected]>
ran go download and go mod tidy to attempt to sort or dependancy issues Signed-off-by: Robert Kielty <[email protected]>
Signed-off-by: Robert Kielty <[email protected]>
First-pass implementation #22 that sets up new CRDs, schema exports, binding manifests and some Makefile targets and docs for kcp.