Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support kubernetes 1.31 #978

Merged
merged 9 commits into from
Oct 24, 2024
Merged

Support kubernetes 1.31 #978

merged 9 commits into from
Oct 24, 2024

Conversation

toshipp
Copy link
Contributor

@toshipp toshipp commented Oct 18, 2024

fix: #951

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
- replace exportloopref with copyloopvar due to a deprecation
- fix the lint failure of the misuse of Errorf

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
As of controller-runtime 0.19.0, it validates that controller names
should be unique[1]. In controller tests, we instantiate a controller
multiple times, therefore, the validation fails. To avoid it, disable
it.

[1]: kubernetes-sigs/controller-runtime#2902

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
@toshipp toshipp force-pushed the k8s-1.31 branch 2 times, most recently from 845bb88 to cb248a7 Compare October 18, 2024 11:01
As of Kubernetes 1.31, it has been deleted. All our supported versions
have it enabled by default.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
This fixes the lint failure due to the deprecation of grpc.Dial.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
As of kubectl 1.31, kubectl exec requires a separator between POD and
COMMAND.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
Because minikube changed MINIKUBE_HOME usage[1], chown now fails. To
address this, use the minikube function to set permissions.

[1]: kubernetes/minikube#18648

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
If fs.protected_regular=1, the root user can't open files owned by other
users in a sticky directory. This causes issues for minikube when it's
run with sudo.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
@toshipp toshipp marked this pull request as ready for review October 22, 2024 01:18
@toshipp toshipp requested a review from a team as a code owner October 22, 2024 01:18
Copy link
Contributor

@cupnes cupnes left a comment

Choose a reason for hiding this comment

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

The definition of the external-snapshotter-leaderelection role can be found here:
https://github.com/kubernetes-csi/external-snapshotter/blob/master/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml

So, please also update the following comment:

# Copied from https://github.com/kubernetes-csi/external-snapshotter/blob/master/deploy/kubernetes/csi-snapshotter/rbac-external-provisioner.yaml

@@ -26,7 +26,7 @@ linters:
# The rules violated to make lint work are commented out. We will fix it eventually.
- dupl
- errcheck
- exportloopref
- copyloopvar
Copy link
Contributor

@llamerada-jp llamerada-jp Oct 23, 2024

Choose a reason for hiding this comment

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

I couldn't find the reason for this change. Could you tell me why this change was caused? Or please add a comment line for future maintenance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please see the commit message. 368fd9c
golintci-lint ouputs the deprecation message.

It referred to the external provisioner Role, it was wrong.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
@llamerada-jp llamerada-jp merged commit a863b08 into main Oct 24, 2024
25 checks passed
@llamerada-jp llamerada-jp deleted the k8s-1.31 branch October 24, 2024 06:28
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update supporting Kubernetes 1.31
3 participants