-
Notifications
You must be signed in to change notification settings - Fork 34
OCPBUGS-30319: bump lib-go to fix SAs acting as OAuth2 clients #108
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
OCPBUGS-30319: bump lib-go to fix SAs acting as OAuth2 clients #108
Conversation
/hold proof PR |
4f272b5
to
db416a9
Compare
c7ea533
to
c17f3ef
Compare
/retest-required |
@@ -5,31 +5,31 @@ go 1.21 | |||
require ( | |||
github.com/MakeNowJust/heredoc v1.0.0 | |||
github.com/google/btree v1.1.2 | |||
github.com/google/go-cmp v0.5.9 | |||
github.com/google/go-cmp v0.6.0 | |||
github.com/google/gofuzz v1.2.0 | |||
github.com/google/uuid v1.6.0 |
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.
kube is on v1.3.0
- https://github.com/kubernetes/kubernetes/blob/release-1.29/go.mod#L47
this dep was changed earlier, I think it is okay since minor version are compatible.
go.mod
Outdated
k8s.io/client-go v0.29.2 | ||
k8s.io/code-generator v0.29.2 | ||
k8s.io/component-base v0.29.2 | ||
k8s.io/klog/v2 v2.120.1 |
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.
kube is on v2.110.1
- https://github.com/kubernetes/kubernetes/blob/release-1.29/go.mod#L114
let's match kube.
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.
ping ?
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 must have been reverted back with some other module upgrade 🤦♂️ Fixed
@@ -49,7 +49,6 @@ func NewOAuthAPIServerOptions(out io.Writer) *OAuthAPIServerOptions { | |||
TokenValidationOptions: tokenvalidationoptions.NewTokenValidationOptions(), | |||
Output: out, | |||
} | |||
o.RecommendedOptions.Etcd.StorageConfig.Paging = true |
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 the change ?
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.
storagebackend.Config
has no field Paging
: https://github.com/openshift/kubernetes-apiserver/blob/openshift-apiserver-4.16-kubernetes-1.29.2/pkg/storage/storagebackend/config.go#L58-L92
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.
ok, the param was removed in kubernetes/kubernetes#121390
@@ -133,7 +132,7 @@ func (o *OAuthAPIServerOptions) NewOAuthAPIServerConfig() (*apiserver.Config, er | |||
} | |||
|
|||
serverConfig.GenericConfig.OpenAPIConfig = openapiconfig.DefaultOpenAPIConfig() | |||
serverConfig.GenericConfig.OpenAPIV3Config = openapiconfig.DefaultOpenAPIConfig() | |||
serverConfig.GenericConfig.OpenAPIV3Config = openapiconfig.DefaultOpenAPIV3Config() |
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 the change ?
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.
DefaultOpenAPIConfig()
returns *common.Config
which is incompatible with common.OpenAPIV3config
(the type of serverConfig.GenericConfig.OpenAPIV3Config
).
go.mod
Outdated
github.com/google/gofuzz v1.2.0 | ||
github.com/google/uuid v1.6.0 | ||
github.com/jteeuwen/go-bindata v3.0.8-0.20151023091102-a0ff2567cfb7+incompatible | ||
github.com/openshift/api v0.0.0-20231101013329-0d0d46454bb7 | ||
github.com/openshift/apiserver-library-go v0.0.0-20230621110634-a99412818848 | ||
github.com/openshift/api v0.0.0-20231218131639-7a5aa77cc72d |
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 not to pull much newer version ?
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 looks like the same applies to the other openshift/*
deps.
go.mod
Outdated
k8s.io/api => k8s.io/api v0.29.2 | ||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.29.2 | ||
k8s.io/apimachinery => k8s.io/apimachinery v0.29.2 | ||
k8s.io/apiserver => github.com/liouk/kubernetes-apiserver v0.0.0-20240313155529-ced3d910063d // points to openshift-apiserver-4.16-kubernetes-1.29.2 |
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.
don't forget to point it to the real repo :)
go.mod
Outdated
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.29.2 | ||
k8s.io/kubectl => k8s.io/kubectl v0.29.2 | ||
k8s.io/kubelet => k8s.io/kubelet v0.29.2 | ||
k8s.io/kubernetes => github.com/openshift/kubernetes v1.29.0-rc.1.0.20240306191509-a0beecc776d4 |
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 should point to k/k
repo, right ?
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.
/cc @dgrisonnet
c17f3ef
to
389f619
Compare
Updated PR to point to |
389f619
to
bcef04e
Compare
func DefaultOpenAPIV3Config() *openapicommon.OpenAPIV3Config { | ||
defNamer := apiserverendpointsopenapi.NewDefinitionNamer(legacyscheme.Scheme, extensionsapiserver.Scheme, aggregatorscheme.Scheme) | ||
return &openapicommon.OpenAPIV3Config{ | ||
Info: &spec.Info{ |
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 looks like spec.Info
could be shared between DefaultOpenAPIV3Config
and DefaultOpenAPIConfig
, could you refactor ?
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.
Right, indeed they're the same type so that's a good idea 👍
@@ -115,3 +116,101 @@ func DefaultOpenAPIConfig() *openapicommon.Config { | |||
SecurityDefinitions: &securityDefinitions, | |||
} | |||
} | |||
|
|||
func DefaultOpenAPIV3Config() *openapicommon.OpenAPIV3Config { | |||
defNamer := apiserverendpointsopenapi.NewDefinitionNamer(legacyscheme.Scheme, extensionsapiserver.Scheme, aggregatorscheme.Scheme) |
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 looks like we could create a default config using genericapiserver.DefaultOpenAPIV3Config
and then overwrite:
spec.Info
IgnorePrefixes
SecuritySchemes
WDYT ?
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 idea, thanks for pointing out genericapiserver.DefaultOpenAPIV3Config
!
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.
OK, once this PR merges can you open a new one for using genericapiserver.DefaultOpenAPIConfig()
in DefaultOpenAPIConfig
?
go.mod
Outdated
k8s.io/kube-aggregator v0.29.2 | ||
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 | ||
k8s.io/kubernetes v1.29.2 | ||
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 |
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.
kube is on v0.0.0-20230726121419-3b25d923346b
- https://github.com/kubernetes/kubernetes/blob/release-1.29/go.mod#L129C15-L129C49
bcef04e
to
016f361
Compare
/retitle OCPBUGS-30319: Bump openshift/kubernetes-apiserver to openshift-apiserver-4.16-kubernetes-1.29.2 |
@liouk: This pull request references Jira Issue OCPBUGS-30319, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In response to this: 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 openshift-eng/jira-lifecycle-plugin repository. |
LGTM just two additional comments, do you mind addressing #108 (comment) and #108 (comment) ? |
016f361
to
adcee10
Compare
/lgtm |
Proof PR updated and can now be used to perform the actual bump. /retitle OCPBUGS-30319: bump lib-go to fix SAs acting as OAuth2 clients |
/hold cancel |
/retest-required |
@liouk: all tests passed! Full PR test history. Your PR dashboard. 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. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liouk, p0lyn0mial, stlaz 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 |
@liouk: Jira Issue OCPBUGS-30319: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-30319 has been moved to the MODIFIED state. In response to this: 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 openshift-eng/jira-lifecycle-plugin repository. |
[ART PR BUILD NOTIFIER] This PR has been included in build ose-oauth-apiserver-container-v4.16.0-202404150912.p0.g87c15a4.assembly.stream.el9 for distgit ose-oauth-apiserver. |
Fix included in accepted release 4.16.0-0.nightly-2024-04-15-184947 |
No description provided.