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

fix: upgrade longhorn csi sidecars version #82

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

ihcsim
Copy link
Collaborator

@ihcsim ihcsim commented Nov 22, 2024

What this PR does / why we need it:

This PR updates the RKE2 templates to use newer version of the Longhorn CSI sidecars. Some of these older sidecars are still dependent on the storage.k8s.io/v1beta1 API, which has been deprecated since K8s 1.27.

With K8s 1.27+, pods within the RKE2 guest cluster would fail during PVC attachments, because the csi-attacher side cars were unable to retrieve the VolumeAttachments and CSINodes resources from the v1beta1 paths:

I1121 20:47:15.379380       1 round_trippers.go:443] GET https://10.43.0.1:443/apis/storage.k8s.io/v1beta1/volumeattachments?limit=500&resourceVersion=0 404 Not Found in 1 milliseconds
I1121 20:47:15.379397       1 round_trippers.go:449] Response Headers:
I1121 20:47:15.379400       1 round_trippers.go:452]     Cache-Control: no-cache, private
I1121 20:47:15.379402       1 round_trippers.go:452]     Content-Type: application/json
I1121 20:47:15.379404       1 round_trippers.go:452]     X-Kubernetes-Pf-Flowschema-Uid: ba9c3907-b529-4a80-b37c-ddd07b5ad532
I1121 20:47:15.379406       1 round_trippers.go:452]     X-Kubernetes-Pf-Prioritylevel-Uid: a1e11fe2-4166-4da4-a907-98ad17f22cc6
I1121 20:47:15.379409       1 round_trippers.go:452]     Content-Length: 174
I1121 20:47:15.379411       1 round_trippers.go:452]     Date: Thu, 21 Nov 2024 20:47:15 GMT
I1121 20:47:15.379413       1 round_trippers.go:452]     Audit-Id: 62bd9e54-7546-44be-b3f4-1b60c5200a65
I1121 20:47:15.379426       1 request.go:1017] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server could not find the requested resource","reason":"NotFound","details":{},"code":404}
E1121 20:47:15.379496       1 reflector.go:156] pkg/mod/k8s.io/client-go@v0.17.0/tools/cache/reflector.go:108: Failed to list *v1beta1.VolumeAttachment: the server could not find the requested resource
I1121 20:47:15.380492       1 round_trippers.go:443] GET https://10.43.0.1:443/apis/storage.k8s.io/v1beta1/csinodes?limit=500&resourceVersion=0 404 Not Found in 2 milliseconds
I1121 20:47:15.380964       1 round_trippers.go:449] Response Headers:
I1121 20:47:15.381192       1 round_trippers.go:452]     Date: Thu, 21 Nov 2024 20:47:15 GMT
I1121 20:47:15.381196       1 round_trippers.go:452]     Audit-Id: 43e85ac7-9231-4eae-85d4-060b33a5de58
I1121 20:47:15.381199       1 round_trippers.go:452]     Cache-Control: no-cache, private
I1121 20:47:15.381201       1 round_trippers.go:452]     Content-Type: application/json
I1121 20:47:15.381203       1 round_trippers.go:452]     X-Kubernetes-Pf-Flowschema-Uid: ba9c3907-b529-4a80-b37c-ddd07b5ad532
I1121 20:47:15.381206       1 round_trippers.go:452]     X-Kubernetes-Pf-Prioritylevel-Uid: a1e11fe2-4166-4da4-a907-98ad17f22cc6
I1121 20:47:15.381208       1 round_trippers.go:452]     Content-Length: 174
I1121 20:47:15.381734       1 request.go:1017] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server could not find the requested resource","reason":"NotFound","details":{},"code":404}

The newer versions of the CSI sidecars resolve this issue by using the storage.k8s.io/v1 API.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

The older csi-attacher used in the DHCP template was still using
the deprecated storage.k8s.io/v1beta1 API, which are no longer
valid post K8s 1.27.

Signed-off-by: Ivan Sim <ivan.sim@suse.com>
Signed-off-by: Ivan Sim <ivan.sim@suse.com>
@belgaied2 belgaied2 merged commit 6760bb4 into rancher-sandbox:main Nov 25, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants