Skip to content

Commit

Permalink
Deeply copy JSONSchemaProps.XValidations.
Browse files Browse the repository at this point in the history
Kubernetes-commit: 14c399ec5e3b75c38446f5ad7bf64584e3e35179
  • Loading branch information
benluddy authored and k8s-publishing-bot committed Feb 4, 2022
1 parent da1467a commit 5a97858
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/apis/apiextensions/deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,5 +290,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
**out = **in
}

if in.XValidations != nil {
in, out := &in.XValidations, &out.XValidations
*out = make([]ValidationRule, len(*in))
copy(*out, *in)
}

return out
}
6 changes: 6 additions & 0 deletions pkg/apis/apiextensions/v1/deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
**out = **in
}

if in.XValidations != nil {
in, out := &in.XValidations, &out.XValidations
*out = make([]ValidationRule, len(*in))
copy(*out, *in)
}

return out
}
6 changes: 6 additions & 0 deletions pkg/apis/apiextensions/v1beta1/deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
**out = **in
}

if in.XValidations != nil {
in, out := &in.XValidations, &out.XValidations
*out = make([]ValidationRule, len(*in))
copy(*out, *in)
}

return out
}

0 comments on commit 5a97858

Please sign in to comment.