mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 20:23:39 +09:00
Lets an operator bound the writes lost when an isolated Redis master is failed over: the master refuses writes while fewer replicas than configured are connected and recent. Both values are unset by default, so the rendered Redis config is unchanged. Redis treats 0 in either directive as disabling the check, so the chart refuses minReplicasMaxLag 0 next to a replica requirement instead of silently turning the protection off. Negative values are refused by the schema (minimum 0), since Redis rejects them at CONFIG SET and the operator would stop healing the Sentinels of that instance. A requirement of replicas or more is refused at render: a master with replicas pods has replicas-1 replicas, so it would refuse every write for good. Assisted-by: LLM Signed-off-by: Yasar Rahman <yasar.rehman@gmail.com>
134 lines
3.6 KiB
Go
Generated
134 lines
3.6 KiB
Go
Generated
//go:build !ignore_autogenerated
|
|
|
|
/*
|
|
Copyright 2025 The Cozystack Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
// Code generated by controller-gen. DO NOT EDIT.
|
|
|
|
package redis
|
|
|
|
import (
|
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
)
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *Config) DeepCopyInto(out *Config) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
|
|
func (in *Config) DeepCopy() *Config {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(Config)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *Config) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec) {
|
|
*out = *in
|
|
in.Resources.DeepCopyInto(&out.Resources)
|
|
out.Size = in.Size.DeepCopy()
|
|
in.Tls.DeepCopyInto(&out.Tls)
|
|
if in.MinReplicasToWrite != nil {
|
|
in, out := &in.MinReplicasToWrite, &out.MinReplicasToWrite
|
|
*out = new(int)
|
|
**out = **in
|
|
}
|
|
if in.MinReplicasMaxLag != nil {
|
|
in, out := &in.MinReplicasMaxLag, &out.MinReplicasMaxLag
|
|
*out = new(int)
|
|
**out = **in
|
|
}
|
|
in.Sentinel.DeepCopyInto(&out.Sentinel)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec.
|
|
func (in *ConfigSpec) DeepCopy() *ConfigSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(ConfigSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *Resources) DeepCopyInto(out *Resources) {
|
|
*out = *in
|
|
out.Cpu = in.Cpu.DeepCopy()
|
|
out.Memory = in.Memory.DeepCopy()
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources.
|
|
func (in *Resources) DeepCopy() *Resources {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(Resources)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *Sentinel) DeepCopyInto(out *Sentinel) {
|
|
*out = *in
|
|
in.Resources.DeepCopyInto(&out.Resources)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sentinel.
|
|
func (in *Sentinel) DeepCopy() *Sentinel {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(Sentinel)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *TLS) DeepCopyInto(out *TLS) {
|
|
*out = *in
|
|
if in.Enabled != nil {
|
|
in, out := &in.Enabled, &out.Enabled
|
|
*out = new(bool)
|
|
**out = **in
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLS.
|
|
func (in *TLS) DeepCopy() *TLS {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(TLS)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|