-
Notifications
You must be signed in to change notification settings - Fork 22
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
Remove Function CRD from porchconfig and Repo #119
Conversation
@@ -61,9 +53,6 @@ type RepositorySpec struct { | |||
Deployment bool `json:"deployment,omitempty"` | |||
// Type of the repository (i.e. git, OCI) | |||
Type RepositoryType `json:"type,omitempty"` | |||
// Content stored in the repository (i.e. Function, Package - the literal values correspond to the API resource names). | |||
// TODO: support repository with mixed content? | |||
Content RepositoryContent `json:"content,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.
Isn't this a backward incompatible change? What happens in cases when a repository is pushed in with a RepositoryContent: Package ?
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.
Good point. I can revert. Or is there a cleaner alternative?
What is the k8s procedure for deprecation of an api attribute?
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.
Won't the "Content" field just be ignored?
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.
Based on the OpenAPI spec in the CRD, it will be just ignored. Would be good to check manually at least.
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 suggested a potential change below that keeps the Content
field the following way:
- if it is not specified explicitly its value is considered to be "Package", as before
- if it is specified with any value other than "Package", the creation of the
Repository
object will be rejected with a human readable error message stating that the field is deprecated.
Please note that make generate
must be run after this change, since it also effects the CRD yamls.
Please note that I haven't tested the change below, I typed it directly into the GH comment box, so it most probably has typos.
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.
Done
/approve |
This is more part 1 of 2. Initial removal is from the porchconfig and Function Repo concept. |
Oh, ok. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: efiacor, JamesMcDermott, nagygergo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
/test presubmit-nephio-go-test |
2 similar comments
/test presubmit-nephio-go-test |
/test presubmit-nephio-go-test |
test presubmit-nephio-go-test |
@@ -61,9 +53,6 @@ type RepositorySpec struct { | |||
Deployment bool `json:"deployment,omitempty"` | |||
// Type of the repository (i.e. git, OCI) | |||
Type RepositoryType `json:"type,omitempty"` | |||
// Content stored in the repository (i.e. Function, Package - the literal values correspond to the API resource names). | |||
// TODO: support repository with mixed content? | |||
Content RepositoryContent `json:"content,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.
I suggested a potential change below that keeps the Content
field the following way:
- if it is not specified explicitly its value is considered to be "Package", as before
- if it is specified with any value other than "Package", the creation of the
Repository
object will be rejected with a human readable error message stating that the field is deprecated.
Please note that make generate
must be run after this change, since it also effects the CRD yamls.
Please note that I haven't tested the change below, I typed it directly into the GH comment box, so it most probably has typos.
d007972
to
12f7597
Compare
/lgtm |
Function CRD is removed as it is unused.
Clean up RepoSpec function references.
Test clean up.
Further removal of the porch api Function attrs to follow.
#465