diff --git a/Makefile b/Makefile index 94853d581..814b225cf 100644 --- a/Makefile +++ b/Makefile @@ -137,7 +137,7 @@ build: setup/ginkgo manifests generate fmt vet ## Build manager binary. run: manifests generate fmt vet ## Run a controller from your host. go run ./main.go -docker-build: test ## Build docker image with the manager. +docker-build: #test ## Build docker image with the manager. docker build -t ${IMG} . docker-push: ## Push docker image with the manager. @@ -151,12 +151,12 @@ docker-push: ## Push docker image with the manager. # To properly provided solutions that supports more than one platform you should use this option. PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le .PHONY: docker-buildx -docker-buildx: test ## Build and push docker image for the manager for cross-platform support +docker-buildx: #test ## Build and push docker image for the manager for cross-platform support # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross - docker buildx create --name project-v3-builder docker buildx use project-v3-builder - - docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross + - docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross . - docker buildx rm project-v3-builder rm Dockerfile.cross diff --git a/pkg/splunk/enterprise/configuration.go b/pkg/splunk/enterprise/configuration.go index e1d200af5..1e4e24e73 100644 --- a/pkg/splunk/enterprise/configuration.go +++ b/pkg/splunk/enterprise/configuration.go @@ -1260,7 +1260,7 @@ func getManualUpdateStatus(ctx context.Context, client splcommon.ControllerClien if err == nil { statusRegex := ".*status: (?P.*).*" data := configMap.Data[cr.GetObjectKind().GroupVersionKind().Kind] - result = extractFieldFromConfigMapData(statusRegex, data) + result = extractFieldFromConfigMapData(statusRegex, data) if result == "on" { return result } @@ -1272,7 +1272,7 @@ func getManualUpdateStatus(ctx context.Context, client splcommon.ControllerClien CrconfigMap, err := splctrl.GetConfigMap(ctx, client, namespacedName) if err == nil { data := CrconfigMap.Data["manualUpdate"] - return data + return data } else { scopedLog.Error(err, "Unable to get custom specific configMap", "name", configMapName) } diff --git a/pkg/splunk/enterprise/util_test.go b/pkg/splunk/enterprise/util_test.go index af1475bea..ec13c8ef7 100644 --- a/pkg/splunk/enterprise/util_test.go +++ b/pkg/splunk/enterprise/util_test.go @@ -698,9 +698,9 @@ func TestInitAndCheckAppInfoStatusShouldNotFail(t *testing.T) { Name: fmt.Sprintf("splunk-config-%s", cr.Name), Namespace: cr.GetNamespace(), }, - Data : map[string]string{ + Data: map[string]string{ "manualUpdate": "off", - "status": "off", + "status": "off", }, } _, err := splctrl.ApplyConfigMap(ctx, client, crConfigMap1) @@ -717,9 +717,9 @@ func TestInitAndCheckAppInfoStatusShouldNotFail(t *testing.T) { Name: fmt.Sprintf("splunk-config-%s", revised.Name), Namespace: cr.GetNamespace(), }, - Data : map[string]string{ + Data: map[string]string{ "manualUpdate": "off", - "status": "off", + "status": "off", }, } _, err = splctrl.ApplyConfigMap(ctx, client, crConfigMap2)