-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add apiextensions.k8s.io/v1 CRDs #3178
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
Conversation
@@ -24,6 +24,7 @@ import ( | |||
|
|||
// +genclient | |||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | |||
// +kubebuilder:storageversion |
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.
Needs to change when v1 is merged in
We never added this before but it breaks controller-gen when not in patching mode which is handy to run for like euh... generating a new version :D
8a03db1
to
cfbe9fc
Compare
Signed-off-by: Maartje Eyskens <maartje@eyskens.me> Run update Signed-off-by: Maartje Eyskens <maartje@eyskens.me> Add back helm things Signed-off-by: Maartje Eyskens <maartje@eyskens.me> Let bazel handle the both types Signed-off-by: Maartje Eyskens <maartje@eyskens.me> Add back additionalPrinterColumns Signed-off-by: Maartje Eyskens <maartje@eyskens.me> Add subresources: status: {} Signed-off-by: Maartje Eyskens <maartje@eyskens.me> re-add short names Signed-off-by: Maartje Eyskens <maartje@eyskens.me> Update conversion Signed-off-by: Maartje Eyskens <maartje@eyskens.me> fix deploy Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
/unhold |
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.
- Are the
deploy/tmp/*
files meant to be committed? Or are they accidentally committed build artifacts?
return review, nil | ||
|
||
versionedOutput, err := defaultScheme.ConvertToVersion(review, outputVersion) | ||
return versionedOutput, err |
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.
Why did this function change so much? Is this the function that converts cmapi resources between versions?
The original never called defaultScheme.ConvertToVersion
, so how did it used to work?
Also it looks like the function now supports both v1beta1 and v1 apiextensions, but should we use a type switch to catch those two expected versions and default with a returned error to catch anything else.
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 does not convert them, it passes the conversion API request to the code that actually handles the conversion. In the past the Kubernetes API could only send a request of type v1beta1. Now it can send both, v1beta1 in legacy installs and v1 in "mainline" installs. Thus the need for us to convert the requests and responses when replying ot k8s.
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.
Type switches I think won't work here as the input is a runtime.Object, but I added a better error
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.
Got it. Thanks for explaining.
/test pull-cert-manager-e2e-v1-19 |
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
/test pull-cert-manager-e2e-v1-15 |
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
/test pull-cert-manager-e2e-v1-15 |
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
@@ -17,7 +17,7 @@ modify_file( | |||
name = "crds.legacy", | |||
src = "//deploy/crds:templates.legacy", | |||
out = "crds.legacy.yaml", | |||
prefix = """{{- if (semverCompare "<1.15-0" .Capabilities.KubeVersion.GitVersion) }} | |||
prefix = """{{- if (semverCompare "<1.16-0" .Capabilities.KubeVersion.GitVersion) }} |
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.
Should we add a more descriptive release note, explaining the new installation yaml for 1.15 users....or will that be done in a separate upgrading section of the release notes?
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 is a very big release note :) will prepare that PR this week so we have it in time for beta.0
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: meyskens, wallrj 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 |
@@ -28,7 +28,7 @@ import ( | |||
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" | |||
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" | |||
apiextensionsinstall "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install" | |||
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" | |||
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" |
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 this PR does / why we need it:
This adds v1 CRDs to use in Kubernetes 1.16, the legacy release will have the v1beta1 version.
Both are being created and updated by
controller-gen
Which issue this PR fixes:
fixes #2953
Special notes for your reviewer:
Webhook still only has v1beta1 conversion support.
Pending on changes off #3167
/hold for this to be merged and v1 conversions to be added
Also should be rebased after #3177 merges
Release note:
/kind cleanup