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

Upgrade k8s depencencies for Openshift 4.16 #615

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ranakan19
Copy link
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
main.go Outdated
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
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
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
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
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

BindAddress: metricsAddr,
},
Cache: cache.Options{DefaultNamespaces: map[string]cache.Config{namespace: {}}},
WebhookServer: webhookServer,
Copy link
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
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
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
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

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.59%. Comparing base (174e42a) to head (bfc55d2).

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

Copy link

openshift-ci bot commented Jan 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [alexeykazakov,ranakan19]

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

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.

4 participants