- 
                Notifications
    You must be signed in to change notification settings 
- Fork 68
🐛 (fix): update PSA versions to match Kubernetes API version #1828
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
Conversation
| ✅ Deploy Preview for olmv1 ready!
 To edit notification comments on pull requests, go to your Netlify site configuration. | 
| Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 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     
 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. | 
        
          
                Makefile
              
                Outdated
          
        
      | # 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/') | 
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.
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)
endifThere 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.
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
d8dd002
    
Derive Kubernetes minor version from client-go for PSA label and combine the calls required to get the k8s version from go.mod