Skip to content
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

Autoset OpenAPI version w/o SecurityDefinitions #66411

Conversation

DirectXMan12
Copy link
Contributor

There's code to automatically populate OpenAPI info based on existing
generic apiserver config, but it only fires if securitydefinitions are
present. This doesn't make much sense, since this info is both required
and independent of security definitions, and there's no easy, generic
way to generate security definitions for an aggregated API server.

Release note:

Properly autopopulate OpenAPI version field without needing other OpenAPI fields present in generic API server code.

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 19, 2018
@DirectXMan12
Copy link
Contributor Author

cc @kubernetes/sig-api-machinery-bugs @kubernetes/sig-api-machinery-pr-reviews

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. kind/bug Categorizes issue or PR as related to a bug. labels Jul 19, 2018
@DirectXMan12
Copy link
Contributor Author

I'm assuming this wasn't intentional -- it doesn't seem like it should be the case.

@@ -387,7 +387,8 @@ func (c *Config) Complete(informers informers.SharedInformerFactory) CompletedCo
},
}
}

}
if c.OpenAPIConfig != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm. It would maybe clearer to keep everything in the if c.OpenAPIConfig != nil block, but guard only the above code with c.OpenAPIConfig.SecurityDefinitions != nil.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either works for me. I went for the route of "less nested indentation", but the other way seems clearer in other regards. I'll switch.

There's code to automatically populate OpenAPI info based on existing
generic apiserver config, but it only fires if securitydefinitions are
present.  This doesn't make much sense, since this info is both required
and independent of security definitions, and there's no easy, generic
way to generate security definitions for an aggregated API server.
@DirectXMan12 DirectXMan12 force-pushed the bug/allow-setting-openapi-version-with-sec branch from 9aca723 to ef73bb6 Compare July 20, 2018 14:27
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 20, 2018
@DirectXMan12
Copy link
Contributor Author

/assign @sttts

@fedebongio
Copy link
Contributor

/cc @mbohlool

@sttts
Copy link
Contributor

sttts commented Jul 24, 2018

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 24, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DirectXMan12, sttts

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 24, 2018
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 4e5c781 into kubernetes:master Jul 24, 2018
@DirectXMan12 DirectXMan12 deleted the bug/allow-setting-openapi-version-with-sec branch July 24, 2018 14:41
@mbohlool
Copy link
Contributor

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants