-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 (config/v3) Track in the project configuration file resources without API #2003
馃悰 (config/v3) Track in the project configuration file resources without API #2003
Conversation
Skipping CI for Draft Pull Request. |
2af85b9
to
0358291
Compare
@@ -98,7 +98,7 @@ scaffold_test_project() { | |||
|
|||
$kb create api --group foo.policy --version v1 --kind HealthCheckPolicy --controller=true --resource=true --make=false | |||
|
|||
$kb create api --group apps --version v1 --kind Pod --controller=true --resource=false --make=false | |||
$kb create api --group apps --version v1 --kind Deployment --controller=true --resource=false --make=false |
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.
a63f8c4
to
d4371e8
Compare
d4371e8
to
7bcbb70
Compare
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.
It shows great.
Could you please squash the commits for we are able to get it merged?
- Remove path from resources that do not know the path - Add scaffold to controllers if we do know the path instead of if we scaffold an API - Track the resources in the config file even if we don't scaffold an API Signed-off-by: Adrian Orive <adrian.orive.oneca@gmail.com>
7bcbb70
to
42091e9
Compare
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.
/lgtm
/approve
Thank you for your contribution 馃
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Adirio, camilamacedo86 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 |
When an API is not scaffolded (
kubebuilder create api --resource=false --controller ...
) the resources are not being tracked in the config file. Tracking this inconfig/v3
is doable as we can still know if the API was scaffolded by some of its fields, but asconfig/v2
doesn't have this additional fields, it can't track this resources. The reason for this is that the pressence of a resource inconfig/v2
means that the API was scaffolded at webhook validation (they require the API to be scaffolded) and this information won't be obtainable.This change also detected that we were defining the
Path
field for those resources that do not have an API which was removed, and it allows to be a bit more intelligent when deploying core-resources.Fixes #2001
Fixes #2002