Skip to content

Upgrade k8s depencencies for Openshift 4.16 - #615

Merged
ranakan19 merged 13 commits into
codeready-toolchain:masterfrom
ranakan19:openshift_4_16_member
Feb 3, 2025
Merged

ranakan19 merged 13 commits into
codeready-toolchain:masterfrom
ranakan19:openshift_4_16_member

Conversation

@ranakan19

Copy link
Copy Markdown
Contributor

Upgrades:

Tool/Library Current Version Updates to Version
Golang 1.20 1.21
Operator SDK 1.25 1.36
k8s.io/* v0.27.0 v0.29.2
controller-runtime v0.15 v0.17.3
controller-gen v0.12.0 v0.14.0

Changes in code wrt to controller-runtime upgrade (introduced in controller-runtime v0.16.0:

wrt: https://issues.redhat.com/browse/SANDBOX-686

@ranakan19 ranakan19 changed the title Openshift 4 16 member Upgrade k8s depencencies for Openshift 4.16 Jan 17, 2025
Comment thread main.go Outdated
LeaderElectionID: "2fc71baf.toolchain.member.operator",
Namespace: namespace,
ClientDisableCacheFor: []client.Object{&kmetrics.NodeMetrics{}},
Client: client.Options{Cache: &client.CacheOptions{DisableFor: []client.Object{&kmetrics.NodeMetrics{}}}},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why do we need to exclude the kmetrics.NodeMetrics objects?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I went back in the history of commits and found where it was added: 38d239f
Maybe worth adding a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added comment in here - bfc55d2

Comment thread main.go Outdated
BindAddress: metricsAddr,
},
Cache: cache.Options{DefaultNamespaces: map[string]cache.Config{namespace: {}}},
WebhookServer: webhookServer,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why do we need this webhook server?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, I have the very same question - we didn't have any webhook configuration before (at least I don't see i there) and we don't use OLM's way of deploying admission webhooks, so do we really need it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we had port before which was deprecated and now removed.
from the documentation:

        // Port is the port that the webhook server serves at.
	// It is used to set webhook.Server.Port if WebhookServer is not set.
	//
	// Deprecated: Use WebhookServer instead. A WebhookServer can be created via webhook.NewServer.
	Port int

for more details I've linked the PR removing deprecated manager options field in the description.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm curious if the default value is the same as we set here (port 9443)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes the default port value is 9443, good thinking/curiosity.
From the following doc - https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/manager/manager.go#L244-L247 - Manager will create a default webhook server with default setting which works for us.
Let me remove the webhook server then.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed in 30e011b

@codecov

codecov Bot commented Jan 17, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.66%. Comparing base (df9a438) to head (b49b2d2).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #615   +/-   ##
=======================================
  Coverage   81.66%   81.66%           
=======================================
  Files          29       29           
  Lines        3305     3305           
=======================================
  Hits         2699     2699           
  Misses        457      457           
  Partials      149      149           

@rsoaresd rsoaresd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work 🚀 Just on question:

Comment thread go.mod Resolved
Comment thread README.adoc Resolved
@openshift-ci

openshift-ci Bot commented Jan 22, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, fbm3307, MatousJobanek, ranakan19, rsoaresd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [MatousJobanek,alexeykazakov,fbm3307,ranakan19,rsoaresd]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ranakan19
ranakan19 requested a review from metlos as a code owner January 24, 2025 19:31
@ranakan19

Copy link
Copy Markdown
Contributor Author

/retest - flaky test

@openshift-ci

openshift-ci Bot commented Jan 30, 2025

Copy link
Copy Markdown

@ranakan19: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

/test e2e

Use /test all to run all jobs.

Details

In response to this:

/retest - flaky test

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-sigs/prow repository.

@ranakan19

Copy link
Copy Markdown
Contributor Author

/retest

@sonarqubecloud

Copy link
Copy Markdown

@ranakan19
ranakan19 merged commit 2833957 into codeready-toolchain:master Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants