Skip to content

Conversation

@camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Mar 3, 2025

Derive Kubernetes minor version from client-go for PSA label and combine the calls required to get the k8s version from go.mod

@camilamacedo86 camilamacedo86 requested a review from a team as a code owner March 3, 2025 16:30
@netlify
Copy link

netlify bot commented Mar 3, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 620792e
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/67c6c90623811500087ea18e
😎 Deploy Preview https://deploy-preview-1828--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.44%. Comparing base (c987cff) to head (620792e).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1828      +/-   ##
==========================================
- Coverage   68.50%   68.44%   -0.06%     
==========================================
  Files          63       63              
  Lines        5134     5134              
==========================================
- Hits         3517     3514       -3     
- Misses       1388     1390       +2     
- Partials      229      230       +1     
Flag Coverage Δ
e2e 51.65% <ø> (ø)
unit 56.01% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Makefile Outdated
Comment on lines 149 to 150
# Minor Kubernetes version to build against derived from the client-go dependency version
KUBE_MINOR ?= $(shell go list -m k8s.io/client-go | cut -d" " -f2 | sed 's/^v0\.\([[:digit:]]\{1,\}\)\.[[:digit:]]\{1,\}$$/1.\1/')
Copy link
Member

Choose a reason for hiding this comment

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

We already have KIND_NODE_VERSION that is nearly the same. Maybe we should consolidate so that we don't have to shell out to go list multiple times?

Also: don't use ?= here. Use :=. This value should not be overridable.

Also, also for future reference: ?= and = causes make to re-evaluate the variable every time it is referenced. We should not use these at all for variables derived from shell commands, because it can make make take much longer unnecessary. If we truly need overridable variables which defaults from a shell command: use this syntax:

ifeq ($(origin VAR_NAME), undefined)
VAR_NAME := $(shell do-a-thing)
endif

Copy link
Contributor Author

@camilamacedo86 camilamacedo86 Mar 3, 2025

Choose a reason for hiding this comment

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

Thank you for the time ...
Done , let me know wdyt.

derive Kubernetes minor version from client-go for PSA updates

- Add `update-k8s-values` Make target to update PSA (Pod Security Admission) labels in YAML manifests with the correct Kubernetes version.
- Ensure PSA version aligns with the supported Kubernetes version, not the latest, to prevent potential breaking changes.
- consolidate go list -m k8s.io/client-go calls for ENVTEST_VERSION, KUBE_VERSION, and KIND_NODE_VERSION
@perdasilva perdasilva added this pull request to the merge queue Mar 4, 2025
Merged via the queue into operator-framework:main with commit d8dd002 Mar 4, 2025
19 of 20 checks passed
camilamacedo86 added a commit to camilamacedo86/operator-framework-catalogd that referenced this pull request Mar 4, 2025
camilamacedo86 added a commit to camilamacedo86/operator-framework-catalogd that referenced this pull request Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants