From 2ca2d750706e166e69859d6cfe162874cd24836a Mon Sep 17 00:00:00 2001
From: Abhishek Dubey <abhishekbhardwaj510@gmail.com>
Date: Tue, 5 Jul 2022 15:18:46 +0530
Subject: [PATCH] [BugFix][Change] Fixed secret whitespace issue in redis
 password (#300)

* Fixed rbac policy for PDB

Signed-off-by: iamabhishek-dubey <abhishekbhardwaj510@gmail.com>

* Fixed whitespace in redis secret

Signed-off-by: iamabhishek-dubey <abhishekbhardwaj510@gmail.com>
---
 CHANGELOG.md        | 11 +++++++++++
 Makefile            |  4 ++--
 k8sutils/secrets.go |  3 ++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 98220847..1e5f4c2a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+### v0.11.0
+##### July 5, 2022
+
+#### :beetle: Bug Fixes
+
+- Fix Redis cluster and Redis CRD
+- Fixed TLS authentication between redis cluster
+- Fixed RBAC policy for PDB
+- Redis exporter exception handled
+- External service fix
+
 ### v0.10.0
 ##### January 26, 2022
 
diff --git a/Makefile b/Makefile
index 75051948..75f0b0d2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 # Current Operator version
-VERSION ?= 0.10.0
+VERSION ?= 0.11.0
 # Default bundle image tag
 BUNDLE_IMG ?= controller-bundle:$(VERSION)
 # Options for 'bundle-build'
@@ -12,7 +12,7 @@ endif
 BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
 
 # Image URL to use all building/pushing image targets
-IMG ?= quay.io/opstree/redis-operator:v0.10.0
+IMG ?= quay.io/opstree/redis-operator:v0.11.0
 # Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
 CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"
 
diff --git a/k8sutils/secrets.go b/k8sutils/secrets.go
index c05d8f24..840d157a 100644
--- a/k8sutils/secrets.go
+++ b/k8sutils/secrets.go
@@ -5,6 +5,7 @@ import (
 	"crypto/tls"
 	"crypto/x509"
 	redisv1beta1 "redis-operator/api/v1beta1"
+	"strings"
 
 	"github.com/go-logr/logr"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -23,7 +24,7 @@ func getRedisPassword(namespace, name, secretKey string) (string, error) {
 	}
 	for key, value := range secretName.Data {
 		if key == secretKey {
-			return string(value), nil
+			return strings.TrimSpace(string(value)), nil
 		}
 	}
 	return "", nil
-- 
GitLab