Skip to content

Commit

Permalink
Remove Auth secret after Deletion of Redis (#781)
Browse files Browse the repository at this point in the history
Signed-off-by: Emon46 <emon@appscode.com>
  • Loading branch information
Emon46 committed Aug 23, 2021
1 parent a982c41 commit 86bf306
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apis/kubedb/v1alpha2/redis_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,15 @@ func (r *Redis) SetTLSDefaults() {
}

func (r *RedisSpec) GetPersistentSecrets() []string {
return nil
if r == nil {
return nil
}

var secrets []string
if r.AuthSecret != nil {
secrets = append(secrets, r.AuthSecret.Name)
}
return secrets
}

func (r *Redis) setDefaultAffinity(podTemplate *ofst.PodTemplateSpec, labels map[string]string, topology *core_util.Topology) {
Expand Down

0 comments on commit 86bf306

Please sign in to comment.