-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Add ControllerRevision to apps/v1beta2 #50698
Conversation
Hi @liyinan926. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. 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. I understand the commands that are listed here. |
/ok-to-test |
@@ -41,6 +41,10 @@ func init() { | |||
// Public to allow building arbitrary schemes. | |||
func RegisterConversions(scheme *runtime.Scheme) error { | |||
return scheme.AddGeneratedConversionFuncs( | |||
Convert_v1beta2_ControllerRevision_To_apps_ControllerRevision, |
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.
@liyinan926 We'd better separate such auto-generated files in another commit, which will be easy to get rebased and reviewed.
ping @janetkuo, PTAL #49645 for conversion tests. For this new added ControllerRevision
, shall we append the tests in this PR.
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.
Split the auto-generated changes out into a separate commit.
13617be
to
27e3cdf
Compare
/retest |
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.
In general looks good but you need to add the registration here
@kow3ns added the registration. |
@@ -168,6 +168,10 @@ var etcdStorageData = map[schema.GroupVersionResource]struct { | |||
expectedEtcdPath: "/registry/replicasets/etcdstoragepathtestnamespace/rs2", | |||
expectedGVK: gvkP("extensions", "v1beta1", "ReplicaSet"), | |||
}, | |||
gvr("apps", "v1beta2", "controllerrevisions"): { | |||
stub: `{"metadata":{"name":"crs2"},"data":{"name":"abc","namespace":"default","creationTimestamp":null,"Spec":{"Replicas":0,"Selector":{"matchLabels":{"foo":"bar"}},"Template":{"creationTimestamp":null,"labels":{"foo":"bar"},"Spec":{"Volumes":null,"InitContainers":null,"Containers":null,"RestartPolicy":"Always","TerminationGracePeriodSeconds":null,"ActiveDeadlineSeconds":null,"DNSPolicy":"ClusterFirst","NodeSelector":null,"ServiceAccountName":"","AutomountServiceAccountToken":null,"NodeName":"","SecurityContext":null,"ImagePullSecrets":null,"Hostname":"","Subdomain":"","Affinity":null,"SchedulerName":"","Tolerations":null,"HostAliases":null}},"VolumeClaimTemplates":null,"ServiceName":""},"Status":{"ObservedGeneration":null,"Replicas":0}},"revision":0}`, | |||
expectedEtcdPath: "/registry/controllerrevisions/etcdstoragepathtestnamespace/crs2", |
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.
You need to update the expectedGVK (GroupVersionKind) to be gvkP("apps", "v1beta1", "ControllerRevision") because the storage format has not been migrated.
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.
@liyinan926 You are probably going to want to add your update commit on top of your initial, or just squash it into the initial as you'll have to do that prior to merging, and add your code generation on top of that. The missing portion of the swagger spec is very likely due to the lack of registration of the group/version/kind as you suggest above. |
e760a1e
to
e7eda01
Compare
@kow3ns re-arranged the commits. Interestingly, after rebasing from the master, autogen touched the swagger/openapi specs and api references. PTAL. Thanks! |
@liyinan926 The autogen creates the swagger spec from a running instance of the API server. As the apps/v1beta2/ControllerRevision group version kind was not registered during your first run, the documentation was not generated. |
@kow3ns you meant re-arranging commits such that changes are made on top of latest master? Or were you suggesting merging the API changes and auto-generated stuffs together? |
e2eb7a8
to
a92c620
Compare
@kow3ns rebased on master and re-arranged commits. PTAL. Thanks! |
/retest |
/assign @lavalamp |
/lgtm |
/unassign @lavalamp @janetkuo @dchen1107 |
/approve |
/assign @smarterclayton Need your approval. PTAL. Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kow3ns, liyinan926, smarterclayton Associated issue: 50696 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 50563, 50698, 50796) |
What this PR does / why we need it:
This PR added
ControllerRevision
currently inapps/v1beta1
toapps/v1beta2
.Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #50696.Special notes for your reviewer:
@kow3ns @janetkuo
Release note: