From 2bcea898c2d620ad768cc7dbe7c88fc9a728fef0 Mon Sep 17 00:00:00 2001 From: mgianluc Date: Sun, 18 Aug 2024 14:35:19 +0200 Subject: [PATCH 1/2] Prepare dev to main merge Post release v0.36.0 --- Makefile | 2 +- config/default/manager_image_patch.yaml | 2 +- go.mod | 2 +- go.sum | 4 ++-- manifest/deployment-shard.yaml | 2 +- manifest/manifest.yaml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index f4a0ffe..8751dd4 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ ARCH ?= amd64 OS ?= $(shell uname -s | tr A-Z a-z) K8S_LATEST_VER ?= $(shell curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) export CONTROLLER_IMG ?= $(REGISTRY)/$(IMAGE_NAME) -TAG ?= v0.36.0 +TAG ?= main .PHONY: all all: build diff --git a/config/default/manager_image_patch.yaml b/config/default/manager_image_patch.yaml index 48671c1..76bdf70 100644 --- a/config/default/manager_image_patch.yaml +++ b/config/default/manager_image_patch.yaml @@ -8,5 +8,5 @@ spec: spec: containers: # Change the value of image field below to your controller image URL - - image: docker.io/projectsveltos/sveltoscluster-manager:v0.36.0 + - image: docker.io/projectsveltos/sveltoscluster-manager:main name: manager diff --git a/go.mod b/go.mod index a57bdc2..ff8cafd 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/onsi/ginkgo/v2 v2.20.0 github.com/onsi/gomega v1.34.1 github.com/pkg/errors v0.9.1 - github.com/projectsveltos/libsveltos v0.36.0 + github.com/projectsveltos/libsveltos v0.36.1-0.20240818102650-9efa40a38767 github.com/robfig/cron/v3 v3.0.1 github.com/spf13/pflag v1.0.5 k8s.io/api v0.30.3 diff --git a/go.sum b/go.sum index dcd8d96..fa4ed4a 100644 --- a/go.sum +++ b/go.sum @@ -128,8 +128,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/projectsveltos/libsveltos v0.36.0 h1:hokXDqNwrvKiFrxuUrgC1WYrHN6EwqUh8FHMzIOAdlI= -github.com/projectsveltos/libsveltos v0.36.0/go.mod h1:+RweK9h48N9E+PFRbictjpzmJaiUgDVDjvz8buhAC3s= +github.com/projectsveltos/libsveltos v0.36.1-0.20240818102650-9efa40a38767 h1:1kwlkZN7/ccVq6y+vwVQrGiaK50aB5YFTglun2gxBdk= +github.com/projectsveltos/libsveltos v0.36.1-0.20240818102650-9efa40a38767/go.mod h1:+RweK9h48N9E+PFRbictjpzmJaiUgDVDjvz8buhAC3s= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= diff --git a/manifest/deployment-shard.yaml b/manifest/deployment-shard.yaml index f5fdd11..bc910d2 100644 --- a/manifest/deployment-shard.yaml +++ b/manifest/deployment-shard.yaml @@ -24,7 +24,7 @@ spec: - --v=5 command: - /manager - image: docker.io/projectsveltos/sveltoscluster-manager:v0.36.0 + image: docker.io/projectsveltos/sveltoscluster-manager:main livenessProbe: failureThreshold: 3 httpGet: diff --git a/manifest/manifest.yaml b/manifest/manifest.yaml index 0022a7e..f2d2b64 100644 --- a/manifest/manifest.yaml +++ b/manifest/manifest.yaml @@ -103,7 +103,7 @@ spec: - --v=5 command: - /manager - image: docker.io/projectsveltos/sveltoscluster-manager:v0.36.0 + image: docker.io/projectsveltos/sveltoscluster-manager:main livenessProbe: failureThreshold: 3 httpGet: From 5327696ff5ee0f7f35d19b94db0328b51cff4817 Mon Sep 17 00:00:00 2001 From: mgianluc Date: Mon, 19 Aug 2024 14:40:09 +0200 Subject: [PATCH 2/2] (bug) Reset Status when ActiveWindow is removed --- controllers/sveltoscluster_controller.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/sveltoscluster_controller.go b/controllers/sveltoscluster_controller.go index e17e382..07755a5 100644 --- a/controllers/sveltoscluster_controller.go +++ b/controllers/sveltoscluster_controller.go @@ -415,6 +415,8 @@ func handleAutomaticPauseUnPause(sveltosCluster *libsveltosv1beta1.SveltosCluste currentTime time.Time, logger logr.Logger) { if sveltosCluster.Spec.ActiveWindow == nil { + sveltosCluster.Status.NextUnpause = nil + sveltosCluster.Status.NextPause = nil return }