diff --git a/.github/workflows/functests.yml b/.github/workflows/functests.yml index 46bae82ab..02fe69483 100644 --- a/.github/workflows/functests.yml +++ b/.github/workflows/functests.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 60 strategy: matrix: - kube-version: ['v1.18.20', 'v1.19.16', 'v1.20.15', 'v1.21.14', 'v1.22.17', 'v1.23.17', 'v1.24.17', 'v1.25.16', 'v1.26.14', 'v1.27.11', 'v1.28.7', 'v1.29.2'] + kube-version: ['v1.20.15', 'v1.21.14', 'v1.22.17', 'v1.23.17', 'v1.24.17', 'v1.25.16', 'v1.26.15', 'v1.27.13', 'v1.28.9', 'v1.29.4', 'v1.30.0'] os: [ubuntu-20.04, ubuntu-22.04] exclude: - os: ubuntu-22.04 @@ -82,7 +82,7 @@ jobs: functests/run-migration-tests.sh "v3.2.2" - name: Run migration tests with DirectCSI v2.0.9 - if: contains(fromJson('["v1.18.20", "v1.19.16", "v1.20.15", "v1.21.14", "v1.22.17"]'), matrix.kube-version) + if: contains(fromJson('["v1.20.15", "v1.21.14", "v1.22.17"]'), matrix.kube-version) run: | sudo rm -fr /var/lib/directpv /var/lib/direct-csi functests/run-migration-tests.sh "v2.0.9" diff --git a/cmd/kubectl-directpv/discover.go b/cmd/kubectl-directpv/discover.go index f43c728ae..39322c601 100644 --- a/cmd/kubectl-directpv/discover.go +++ b/cmd/kubectl-directpv/discover.go @@ -299,7 +299,7 @@ func syncNodes(ctx context.Context) (err error) { // Add missing nodes. for _, csiNode := range csiNodes { if !utils.Contains(nodeNames, csiNode) { - node := types.NewNode(directpvtypes.NodeID(csiNode), nil) + node := types.NewNode(directpvtypes.NodeID(csiNode), []types.Device{}) node.Spec.Refresh = true if _, err = client.NodeClient().Create(ctx, node, metav1.CreateOptions{}); err != nil { return fmt.Errorf("unable to create node %v; %w", csiNode, err) diff --git a/cmd/kubectl-directpv/install.go b/cmd/kubectl-directpv/install.go index 6dd000ffe..4de78fd45 100644 --- a/cmd/kubectl-directpv/install.go +++ b/cmd/kubectl-directpv/install.go @@ -50,7 +50,7 @@ var ( imagePullSecrets = []string{} nodeSelector map[string]string tolerations []corev1.Toleration - k8sVersion = "1.27.0" + k8sVersion = "1.29.0" kubeVersion *version.Version legacyFlag bool declarativeFlag bool diff --git a/docs/installation.md b/docs/installation.md index e2477d598..57ba82293 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -35,7 +35,7 @@ $ chmod a+x kubectl-directpv Before starting the installation, it is required to have DirectPV plugin installed on your system. For plugin installation refer [this documentation](#directpv-plugin-installation). If you are not using `krew`, replace `kubectl directpv` by `kubectl-directpv` in below steps. ### Prerequisites -* Kubernetes >= v1.18 on GNU/Linux on amd64. +* Kubernetes >= v1.20 on GNU/Linux on amd64. * If you use private registry, below images must be pushed into your registry. You could use [this helper script](tools/push-images.sh) to do that. - quay.io/minio/csi-node-driver-registrar:v2.8.0 - quay.io/minio/csi-provisioner:v3.5.0 _(for Kubernetes >= v1.20)_ diff --git a/pkg/installer/installer.go b/pkg/installer/installer.go index 1afde1024..cf80e38b1 100644 --- a/pkg/installer/installer.go +++ b/pkg/installer/installer.go @@ -88,7 +88,7 @@ func Install(ctx context.Context, args *Args) (err error) { case args.DryRun: if args.KubeVersion == nil { // default higher version - if args.KubeVersion, err = version.ParseSemantic("1.27.0"); err != nil { + if args.KubeVersion, err = version.ParseSemantic("1.29.0"); err != nil { klog.Fatalf("this should not happen; %v", err) } } @@ -112,7 +112,7 @@ func Install(ctx context.Context, args *Args) (err error) { if args.KubeVersion.Major() != 1 || args.KubeVersion.Minor() < 18 || - args.KubeVersion.Minor() > 27 { + args.KubeVersion.Minor() > 30 { if !args.DryRun { utils.Eprintf( args.Quiet, diff --git a/pkg/node/event.go b/pkg/node/event.go index acdba368a..c8b478497 100644 --- a/pkg/node/event.go +++ b/pkg/node/event.go @@ -64,7 +64,7 @@ func (handler *nodeEventHandler) ObjectType() runtime.Object { func (handler *nodeEventHandler) Handle(ctx context.Context, eventType controller.EventType, object runtime.Object) error { switch eventType { - case controller.UpdateEvent: + case controller.UpdateEvent, controller.AddEvent: node := object.(*types.Node) if node.Spec.Refresh { return Sync(ctx, directpvtypes.NodeID(node.Name))