Closed Michael754267513 closed 1 month ago
Hi, could you please add some details of this?
Like, how to reproduce it, or the behavior excerpt of your env? Thanks.
apiVersion: policy.karmada.io/v1alpha1 kind: OverridePolicy metadata: name: frontend-v1 namespace: automation spec: resourceSelectors:
58s Normal SyncWorkSucceed resourcebinding/frontend-v1-deployment Sync work of resourceBinding(automation/frontend-v1-deployment) successful. 58s Normal AggregateStatusSucceed resourcebinding/frontend-v1-deployment Update resourceBinding(automation/frontend-v1-deployment) with AggregatedStatus successfully. 58s Normal ScheduleBindingSucceed resourcebinding/frontend-v1-deployment Binding has been scheduled 2m4s Normal ScheduleBindingSucceed resourcebinding/frontend-v1-service Binding has been scheduled 58s Normal SyncWorkSucceed resourcebinding/frontend-v1-service Sync work of resourceBinding(automation/frontend-v1-service) successful. 58s Normal AggregateStatusSucceed resourcebinding/frontend-v1-service Update resourceBinding(automation/frontend-v1-service) with AggregatedStatus successfully. 58s Normal ScheduleBindingSucceed resourcebinding/frontend-v1-service Binding has been scheduled 2m4s Normal ScheduleBindingSucceed service/frontend-v1 Binding has been scheduled 58s Normal SyncSucceed service/frontend-v1 Successfully applied resource(automation/frontend-v1) to cluster wx3 58s Normal SyncSucceed service/frontend-v1 Successfully applied resource(automation/frontend-v1) to cluster ap 17s Warning SyncFailed deployment/frontend-v1 Failed to create or update resource(automation/frontend-v1) in member cluster(ap): Deployment in version "v1" cannot be handled as a Deployment: v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.Env: []v1.EnvVar: decode slice: expect [ or n, but found {, error found in #10 byte of ...|:[{"env":{"bad":"bad|..., bigger context ...|stio-frontend-v1"}},"spec":{"containers":[{"env":{"bad":"bad1"},"image":" ... 17s Warning SyncFailed deployment/frontend-v1 Failed to create or update resource(automation/frontend-v1) in member cluster(wx3): Deployment in version "v1" cannot be handled as a Deployment: json: cannot unmarshal object into Go struct field Container.spec.template.spec.containers.env of type []v1.EnvVar 58s Normal SyncSucceed service/frontend-v1 Successfully applied resource(automation/frontend-v1) to cluster dc 58s Normal ApplyPolicySucceed deployment/frontend-v1 Apply policy(automation/frontend-v1) succeed 58s Normal SyncWorkSucceed deployment/frontend-v1 Sync work of resourceBinding(automation/frontend-v1-deployment) successful. 58s Normal AggregateStatusSucceed deployment/frontend-v1 Update resourceBinding(automation/frontend-v1-deployment) with AggregatedStatus successfully. 58s Normal SyncWorkSucceed service/frontend-v1 Sync work of resourceBinding(automation/frontend-v1-service) successful. 58s Normal ApplyPolicySucceed service/frontend-v1 Apply policy(automation/frontend-v1) succeed 58s Normal ScheduleBindingSucceed deployment/frontend-v1 Binding has been scheduled 58s Normal AggregateStatusSucceed service/frontend-v1 Update resourceBinding(automation/frontend-v1-service) with AggregatedStatus successfully. 17s Warning SyncFailed deployment/frontend-v1 Failed to create or update resource(automation/frontend-v1) in member cluster(dc): Deployment in version "v1" cannot be handled as a Deployment: v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.Env: []v1.EnvVar: decode slice: expect [ or n, but found {, error found in #10 byte of ...|:[{"env":{"bad":"bad|..., bigger context ...|stio-frontend-v1"}},"spec":{"containers":[{"env":{"bad":"bad2"},"image":" |... 58s Normal ScheduleBindingSucceed service/frontend-v1 Binding has been scheduled 58s Normal ApplyOverridePolicySucceed deployment/frontend-v1 Apply override policy(automation/frontend-v1) for cluster(ap) succeed. 58s Normal ApplyOverridePolicySucceed deployment/frontend-v1 Apply override policy(automation/frontend-v1) for cluster(dc) succeed. 58s Normal ApplyOverridePolicySucceed deployment/frontend-v1 Apply override policy(automation/frontend-v1) for cluster(wx3) succeed.
Can you share the yaml of the Deployment(frontend-v1)? So that, we can reproduce it?
As a lack of activity, let's close this first, feel free to reopen it if you still need it. /close
@XiShanYongYe-Chang: Closing this issue.
When using plaintext to rewrite the data in different clusters, when the patch format is incorrect, the override format is directly returned and the application is not allowed to be applied to the cluster