Add support for policy auto-creation

This commit is contained in:
M Essam Hamed
2025-04-16 14:45:23 +02:00
committed by M. Essam
parent 924f17f525
commit 38445c58fa
12 changed files with 712 additions and 212 deletions
+31
View File
@@ -329,6 +329,18 @@ func (in *NBResourceSpec) DeepCopyInto(out *NBResourceSpec) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.PolicySourceGroups != nil {
in, out := &in.PolicySourceGroups, &out.PolicySourceGroups
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.PolicyFriendlyName != nil {
in, out := &in.PolicyFriendlyName, &out.PolicyFriendlyName
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.TCPPorts != nil {
in, out := &in.TCPPorts, &out.TCPPorts
*out = make([]int32, len(*in))
@@ -379,6 +391,18 @@ func (in *NBResourceStatus) DeepCopyInto(out *NBResourceStatus) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.PolicySourceGroups != nil {
in, out := &in.PolicySourceGroups, &out.PolicySourceGroups
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.PolicyFriendlyName != nil {
in, out := &in.PolicyFriendlyName, &out.PolicyFriendlyName
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]NBCondition, len(*in))
@@ -386,6 +410,13 @@ func (in *NBResourceStatus) DeepCopyInto(out *NBResourceStatus) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.PolicyNameMapping != nil {
in, out := &in.PolicyNameMapping, &out.PolicyNameMapping
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NBResourceStatus.