diff --git a/pkg/workload/nats/helper.go b/pkg/workload/nats/helper.go index 35afdb5..ea00bab 100644 --- a/pkg/workload/nats/helper.go +++ b/pkg/workload/nats/helper.go @@ -83,7 +83,7 @@ func CreateOrUpdateUser(request *aprv1.MiddlewareRequest, namespace, password st } func getAllowPubSubSubjectFromMR(request *aprv1.MiddlewareRequest, namespace string) ([]string, []string, error) { - req := request.Spec.Nats + req := request.Spec.Nats.DeepCopy() for i, s := range req.Subjects { req.Subjects[i].Name = MakeRealSubjectName(s.Name, request.Spec.AppNamespace)