-
Notifications
You must be signed in to change notification settings - Fork 366
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
✨ WIP: new APILifecycle CRD #2857
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
98a7778
to
784d729
Compare
conditionsv1alpha1 "github.com/kcp-dev/kcp/pkg/apis/third_party/conditions/apis/conditions/v1alpha1" | ||
) | ||
|
||
// APILifecycle |
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.
this needs much more explanation. It's maybe the most important part of the PR.
// | ||
// +required | ||
// +kubebuilder:validation:Required | ||
Hooks APILifecycleHooks `json:"hooks"` |
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.
what are these hooks in the future? Am hesitant to want a (core) API to go in without a clear plan where it is heading.
// GroupResource, identity, and other properties. | ||
// | ||
// +optional | ||
PermissionClaims []PermissionClaim `json:"permissionClaims,omitempty"` |
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.
Where are these coming from? How do they interact with the APIBinding.spec.claims
? From the API docs it's hard to understand how both resources interact.
// +required | ||
// +kubebuilder:validation:Required | ||
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="APIExport reference must not be changed" | ||
Reference string `json:"reference"` |
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.
what is a reference? By what?
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.
looking at https://github.com/kcp-dev/kcp/pull/2857/files#diff-8974af955051bac46bc873a4f200e0bb99601d12b165ae055fe0d6f287d12d8dR102 this indicates being the APIExport name; shoudn't this be the export hash instead? I believe we have prior art referencing API exports in kcp that could be reused here.
|
||
type APILifecycleHook struct { | ||
// url where the hook is located | ||
URL string `json:"url"` |
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.
what is this URL ? a webhook? manifests? What's the payload on post? What does it return?
type APILifecycleHooks struct { | ||
// bind is invoked when a binding is created and updated | ||
// +optional | ||
Bind *APILifecycleHook `json:"bind"` |
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.
what does "when" mean exactly?
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@kcp-dev/kcp-maintainers do we still want to do this? |
Summary
Bare minimum implementation of the APILifecycle controller.
Related issue(s)
Fixes #