kubebuilder icon indicating copy to clipboard operation
kubebuilder copied to clipboard

[Assessment and POC] - Integrate Server-Side-Apply Support in Kubebuilder via Controller-Tools and Code-Generator Enhancements

Open camilamacedo86 opened this issue 2 years ago • 0 comments
trafficstars

What do you want to happen?

Background:

  • Kubebuilder currently depends on controller-tools, which lacks server-side-apply support.
  • Consequently, Kubebuilder also does not support server-side-apply.
  • An open PR in controller-runtime (#536) aims to introduce this support.
  • Alternative approach suggested: using kubernetes/code-generator as seen in PR #818 in controller-tools.
  • Discussions in the Kubernetes Slack channel (link to thread) highlight the need for changes in Kubebuilder's default scaffold for compatibility with applyconfiguration-gen.

Proposed Changes:

  1. Move +groupName from groupversion_info.go to doc.go:
  2. Rename GroupVersion to SchemeGroupVersion in groupversion_info.go.

Detailed steps/tasks:

  • a) Analyze how groupName is used in controller-tools. see here
  • b) Assess the feasibility of moving groupName to doc.go.
  • c) Ensure controller tools and related components remain functional after changes.
  • d) Evaluate if changing the default scaffold could introduce breaking changes for existing projects.
  • e) Confirm the necessity of changes for compatibility with /applyconfiguration-gen.
  • f) Investigate additional requirements for Kubebuilder scaffold to work with applyconfiguration-gen, including Makefile configurations (reference PR).

Acceptance Criteria:

  • Detailed analysis and feasibility report on the proposed changes and comment on this issue with a summary of its findings.
  • A PR against kubebuilder with the proposed changes as well as any other one identified as required to support applyconfiguration-gen so that we can check if it will break or not the current project.
  • A PR against kubebuilder adding applyconfiguration-gen in the Makefile and using it in the e2e tests with those changes so that we can verify it working with applyconfiguration-gen. We can just copy and paste the go/v4 tests and create a new one with this proposal.

The above result will allow us to talk about it and see if we can move forward indeed with the PRs and with the changes proposed now or just in the future.

c/c @erikgb @JoelSpeed @varshaprasad96

Extra Labels

No response

camilamacedo86 avatar Nov 12 '23 17:11 camilamacedo86