From 699848f75fea9c3164233de2fdbf9d77d6faa286 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 14 Nov 2023 13:26:58 +0100 Subject: [PATCH 1/3] ci: update group rules for dependabot update group rules for dependabot for tools folder. Signed-off-by: Madhu Rajanna --- .github/dependabot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 04d0782b2..85b9fc1fa 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -40,6 +40,7 @@ updates: patterns: - "github.com/golang*" - "google.golang.org/*" + - "golang.org/x/*" k8s-dependencies: patterns: - "k8s.io*" From 209424ee698060751615a72caecdc8ee246500d4 Mon Sep 17 00:00:00 2001 From: rakeshgm Date: Tue, 31 Oct 2023 23:35:16 +0530 Subject: [PATCH 2/3] update to proper message on a successful fence op Signed-off-by: rakeshgm --- apis/csiaddons/v1alpha1/networkfence_types.go | 8 ++++++++ controllers/csiaddons/networkfence_controller.go | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/apis/csiaddons/v1alpha1/networkfence_types.go b/apis/csiaddons/v1alpha1/networkfence_types.go index 7f0373901..71b891c3c 100644 --- a/apis/csiaddons/v1alpha1/networkfence_types.go +++ b/apis/csiaddons/v1alpha1/networkfence_types.go @@ -40,6 +40,14 @@ const ( FencingOperationResultFailed FencingOperationResult = "Failed" ) +const ( + // FenceOperationSuccessfulMessage represents successful message on fence operation + FenceOperationSuccessfulMessage = "fencing operation successful" + + // UnFenceOperationSuccessfulMessage represents successful message on unfence operation + UnFenceOperationSuccessfulMessage = "unfencing operation successful" +) + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="secret is immutable" // SecretSpec defines the secrets to be used for the network fencing operation. type SecretSpec struct { diff --git a/controllers/csiaddons/networkfence_controller.go b/controllers/csiaddons/networkfence_controller.go index c52b53aed..d859e7567 100644 --- a/controllers/csiaddons/networkfence_controller.go +++ b/controllers/csiaddons/networkfence_controller.go @@ -154,7 +154,15 @@ func (r *NetworkFenceReconciler) Reconcile(ctx context.Context, req ctrl.Request return ctrl.Result{}, err } - err = nf.updateStatus(ctx, csiaddonsv1alpha1.FencingOperationResultSucceeded, "fencing operation successful") + var successMsg string + switch nf.instance.Spec.FenceState { + case csiaddonsv1alpha1.Fenced: + successMsg = csiaddonsv1alpha1.FenceOperationSuccessfulMessage + case csiaddonsv1alpha1.Unfenced: + successMsg = csiaddonsv1alpha1.UnFenceOperationSuccessfulMessage + } + + err = nf.updateStatus(ctx, csiaddonsv1alpha1.FencingOperationResultSucceeded, successMsg) if err != nil { logger.Error(err, "failed to update status") return ctrl.Result{}, err From 397940a2db2ed4889e10dcaa2be390e6d97e6db3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:09:18 +0000 Subject: [PATCH 3/3] vendor: bump the k8s-dependencies group with 2 updates Bumps the k8s-dependencies group with 2 updates: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `k8s.io/api` from 0.28.3 to 0.28.4 - [Commits](https://github.com/kubernetes/api/compare/v0.28.3...v0.28.4) Updates `k8s.io/client-go` from 0.28.3 to 0.28.4 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.3...v0.28.4) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-dependencies - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-dependencies ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 12 ++++++------ vendor/modules.txt | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 68cbbd124..8cde6c8ad 100644 --- a/go.mod +++ b/go.mod @@ -14,9 +14,9 @@ require ( go.uber.org/zap v1.26.0 google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 - k8s.io/api v0.28.3 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 + k8s.io/api v0.28.4 + k8s.io/apimachinery v0.28.4 + k8s.io/client-go v0.28.4 k8s.io/klog/v2 v2.110.1 sigs.k8s.io/controller-runtime v0.16.3 ) diff --git a/go.sum b/go.sum index 30e95b3d4..1950a4be0 100644 --- a/go.sum +++ b/go.sum @@ -265,14 +265,14 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= diff --git a/vendor/modules.txt b/vendor/modules.txt index b924dd5d3..b78ae6c51 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -402,7 +402,7 @@ gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# k8s.io/api v0.28.3 +# k8s.io/api v0.28.4 ## explicit; go 1.20 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 @@ -469,7 +469,7 @@ k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 -# k8s.io/apimachinery v0.28.3 +# k8s.io/apimachinery v0.28.4 ## explicit; go 1.20 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors @@ -522,7 +522,7 @@ k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/client-go v0.28.3 +# k8s.io/client-go v0.28.4 ## explicit; go 1.20 k8s.io/client-go/applyconfigurations/admissionregistration/v1 k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1