Skip to content

Commit d651821

Browse files
committed
MINOR: fix DeepCopy Backend CRD
1 parent 7d5d362 commit d651821

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

crs/api/ingress/v1/backend.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@ func (in *BackendSpec) DeepCopyInto(out *BackendSpec) {
4545
b, _ := in.Config.MarshalBinary()
4646
_ = out.Config.UnmarshalBinary(b)
4747
}
48+
if in.Acls != nil {
49+
out.Acls = make(models.Acls, len(in.Acls))
50+
for i, v := range in.Acls {
51+
b, _ := v.MarshalBinary()
52+
out.Acls[i] = &models.ACL{}
53+
_ = out.Acls[i].UnmarshalBinary(b)
54+
}
55+
}
56+
57+
if in.HTTPRequests != nil {
58+
out.HTTPRequests = make(models.HTTPRequestRules, len(in.HTTPRequests))
59+
for i, v := range in.HTTPRequests {
60+
b, _ := v.MarshalBinary()
61+
out.HTTPRequests[i] = &models.HTTPRequestRule{}
62+
_ = out.HTTPRequests[i].UnmarshalBinary(b)
63+
}
64+
}
4865
}
4966

5067
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

0 commit comments

Comments
 (0)