Skip to content

Conversation

@RobertKielty
Copy link
Collaborator

First-pass implementation #22 that sets up new CRDs, schema exports, binding manifests and some Makefile targets and docs for kcp.

  - 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]>
// +kubebuilder:object:root=true

// AuditLog is an append-only record for significant maintainer operations.
type AuditLog struct {
Copy link
Collaborator

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.

// +kubebuilder:subresource:status

// ReconciliationResult stores reconciliation findings for audit and follow-up.
type ReconciliationResult struct {
Copy link
Collaborator

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.

Copy link
Collaborator Author

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]>
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.

3 participants