Skip to content

Commit

Permalink
[BugFix][Change] Fixed secret whitespace issue in redis password (#300)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
iamabhishek-dubey authored Jul 5, 2022
1 parent 24209e6 commit 2ca2d75
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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"

Expand Down
3 changes: 2 additions & 1 deletion k8sutils/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 2ca2d75

Please sign in to comment.