Skip to content

Commit

Permalink
MINOR: fix DeepCopy Backend CRD
Browse files Browse the repository at this point in the history
  • Loading branch information
hdurand0710 committed Sep 24, 2024
1 parent 4e5ef67 commit 2c97763
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions crs/api/ingress/v1/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ func (in *BackendSpec) DeepCopyInto(out *BackendSpec) {
b, _ := in.Config.MarshalBinary()
_ = out.Config.UnmarshalBinary(b)
}
if in.Acls != nil {
out.Acls = make(models.Acls, len(in.Acls))
for i, v := range in.Acls {
b, _ := v.MarshalBinary()
out.Acls[i] = &models.ACL{}
_ = out.Acls[i].UnmarshalBinary(b)
}
}

if in.HTTPRequests != nil {
out.HTTPRequests = make(models.HTTPRequestRules, len(in.HTTPRequests))
for i, v := range in.HTTPRequests {
b, _ := v.MarshalBinary()
out.HTTPRequests[i] = &models.HTTPRequestRule{}
_ = out.HTTPRequests[i].UnmarshalBinary(b)
}
}
}

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

0 comments on commit 2c97763

Please sign in to comment.