1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-15 17:51:03 +00:00

Update deepcopy

This commit is contained in:
ajanikow 2020-04-16 09:20:28 +00:00
parent 6ab800bec8
commit da2d9b70bf
2 changed files with 25 additions and 3 deletions

View file

@ -100,7 +100,7 @@ type Action struct {
// Image used in can of a SetCurrentImage action.
Image string `json:"image,omitempty"`
// Params additional parameters used for action
Params map[string]interface{} `json:"params,omitempty"`
Params map[string]string `json:"params,omitempty"`
}
// Equal compares two Actions
@ -117,9 +117,9 @@ func (a Action) Equal(other Action) bool {
}
// AddParam returns copy of action with set parameter
func (a Action) AddParam(key string, value interface{}) Action {
func (a Action) AddParam(key, value string) Action {
if a.Params == nil {
a.Params = map[string]interface{}{}
a.Params = map[string]string{}
}
a.Params[key] = value

View file

@ -40,6 +40,13 @@ func (in *Action) DeepCopyInto(out *Action) {
in, out := &in.StartTime, &out.StartTime
*out = (*in).DeepCopy()
}
if in.Params != nil {
in, out := &in.Params, &out.Params
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}
@ -669,6 +676,16 @@ func (in *MetricsSpec) DeepCopyInto(out *MetricsSpec) {
}
in.Authentication.DeepCopyInto(&out.Authentication)
in.Resources.DeepCopyInto(&out.Resources)
if in.Mode != nil {
in, out := &in.Mode, &out.Mode
*out = new(MetricsMode)
**out = **in
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(uint16)
**out = **in
}
return
}
@ -1006,6 +1023,11 @@ func (in *ServerGroupSpec) DeepCopyInto(out *ServerGroupSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.ExtendedRotationCheck != nil {
in, out := &in.ExtendedRotationCheck, &out.ExtendedRotationCheck
*out = new(bool)
**out = **in
}
return
}