Skip to content

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

Merged

Conversation

liouk
Copy link
Member

@liouk liouk commented Mar 14, 2024

No description provided.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 14, 2024
@liouk
Copy link
Member Author

liouk commented Mar 14, 2024

/hold proof PR

@openshift-ci openshift-ci bot requested review from deads2k and mfojtik March 14, 2024 10:49
@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 14, 2024
@liouk liouk force-pushed the prove-kubernetes-apiserver-56 branch from 4f272b5 to db416a9 Compare March 14, 2024 13:47
@liouk liouk changed the title WIP: Proof for https://github.com/openshift/kubernetes-apiserver/pull/56 Proof for https://github.com/openshift/kubernetes-apiserver/pull/56 Mar 15, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 15, 2024
@liouk liouk force-pushed the prove-kubernetes-apiserver-56 branch 2 times, most recently from c7ea533 to c17f3ef Compare March 15, 2024 15:26
@liouk
Copy link
Member Author

liouk commented Mar 18, 2024

/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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

ping ?

Copy link
Member Author

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
Copy link
Contributor

Choose a reason for hiding this comment

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

why the change ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

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()
Copy link
Contributor

Choose a reason for hiding this comment

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

why the change ?

Copy link
Member Author

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
Copy link
Contributor

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 ?

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@openshift-ci openshift-ci bot requested a review from dgrisonnet April 10, 2024 10:06
@liouk liouk force-pushed the prove-kubernetes-apiserver-56 branch from c17f3ef to 389f619 Compare April 10, 2024 13:52
@liouk
Copy link
Member Author

liouk commented Apr 10, 2024

Updated PR to point to openshift/[email protected].

@liouk liouk force-pushed the prove-kubernetes-apiserver-56 branch from 389f619 to bcef04e Compare April 10, 2024 14:20
func DefaultOpenAPIV3Config() *openapicommon.OpenAPIV3Config {
defNamer := apiserverendpointsopenapi.NewDefinitionNamer(legacyscheme.Scheme, extensionsapiserver.Scheme, aggregatorscheme.Scheme)
return &openapicommon.OpenAPIV3Config{
Info: &spec.Info{
Copy link
Contributor

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 ?

Copy link
Member Author

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)
Copy link
Contributor

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 ?

Copy link
Member Author

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!

Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

@liouk liouk force-pushed the prove-kubernetes-apiserver-56 branch from bcef04e to 016f361 Compare April 11, 2024 09:13
@liouk
Copy link
Member Author

liouk commented Apr 11, 2024

/retitle OCPBUGS-30319: Bump openshift/kubernetes-apiserver to openshift-apiserver-4.16-kubernetes-1.29.2

@openshift-ci openshift-ci bot changed the title Proof for https://github.com/openshift/kubernetes-apiserver/pull/56 OCPBUGS-30319: Bump openshift/kubernetes-apiserver to openshift-apiserver-4.16-kubernetes-1.29.2 Apr 11, 2024
@openshift-bot openshift-bot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Apr 11, 2024
@openshift-bot
Copy link
Contributor

@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
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @dpuniaredhat

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.

@openshift-ci openshift-ci bot requested a review from dpuniaredhat April 11, 2024 10:15
@p0lyn0mial
Copy link
Contributor

LGTM

just two additional comments, do you mind addressing #108 (comment) and #108 (comment) ?

@liouk liouk force-pushed the prove-kubernetes-apiserver-56 branch from 016f361 to adcee10 Compare April 11, 2024 12:27
@p0lyn0mial
Copy link
Contributor

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 11, 2024
@liouk
Copy link
Member Author

liouk commented Apr 11, 2024

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

@p0lyn0mial
Copy link
Contributor

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 11, 2024
@openshift-ci openshift-ci bot changed the title OCPBUGS-30319: Bump openshift/kubernetes-apiserver to openshift-apiserver-4.16-kubernetes-1.29.2 OCPBUGS-30319: bump lib-go to fix SAs acting as OAuth2 clients Apr 11, 2024
@liouk
Copy link
Member Author

liouk commented Apr 12, 2024

/retest-required

Copy link

openshift-ci bot commented Apr 12, 2024

@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.

@stlaz
Copy link
Contributor

stlaz commented Apr 15, 2024

/approve

Copy link

openshift-ci bot commented Apr 15, 2024

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 15, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 87c15a4 into openshift:master Apr 15, 2024
8 checks passed
@openshift-ci-robot
Copy link
Contributor

@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.

@openshift-bot
Copy link
Contributor

[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.
All builds following this will include this PR.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.16.0-0.nightly-2024-04-15-184947

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. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants