From d6c2f4628a3fc208ee105630394336f312e3e1aa Mon Sep 17 00:00:00 2001 From: wkd-woo Date: Sat, 2 Mar 2024 20:22:04 +0900 Subject: [PATCH] feat: add redis username for ACL Signed-off-by: wkd-woo --- api/v1beta2/common_types.go | 9 ++++++++- api/v1beta2/zz_generated.deepcopy.go | 30 ++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/api/v1beta2/common_types.go b/api/v1beta2/common_types.go index c29f3d780..9f564bad5 100644 --- a/api/v1beta2/common_types.go +++ b/api/v1beta2/common_types.go @@ -38,6 +38,13 @@ type RedisConfig struct { common.RedisConfig `json:",inline"` } +// ExistingAuthSecret is the struct to access the existing secret +type ExistingAuthSecret struct { + Name *string `json:"name,omitempty"` + UsernameKey *string `json:"username,omitempty"` + PasswordKey *string `json:"password,omitempty"` +} + // Storage is the inteface to add pvc and pv support in redis type Storage struct { common.Storage `json:",inline"` @@ -65,7 +72,7 @@ type ACLConfig struct { Secret *corev1.SecretVolumeSource `json:"secret,omitempty"` } -// Probe is a interface for ReadinessProbe and LivenessProbe +// Probe is an interface for ReadinessProbe and LivenessProbe type Probe struct { common.Probe `json:",inline"` } diff --git a/api/v1beta2/zz_generated.deepcopy.go b/api/v1beta2/zz_generated.deepcopy.go index a7baa3052..0b6da6647 100644 --- a/api/v1beta2/zz_generated.deepcopy.go +++ b/api/v1beta2/zz_generated.deepcopy.go @@ -64,6 +64,36 @@ func (in *ClusterStorage) DeepCopy() *ClusterStorage { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExistingAuthSecret) DeepCopyInto(out *ExistingAuthSecret) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.UsernameKey != nil { + in, out := &in.UsernameKey, &out.UsernameKey + *out = new(string) + **out = **in + } + if in.PasswordKey != nil { + in, out := &in.PasswordKey, &out.PasswordKey + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExistingAuthSecret. +func (in *ExistingAuthSecret) DeepCopy() *ExistingAuthSecret { + if in == nil { + return nil + } + out := new(ExistingAuthSecret) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InitContainer) DeepCopyInto(out *InitContainer) { *out = *in