Skip to content

Move to Patch API on infra-client #2995

@ardikabs

Description

@ardikabs

Description:
Follow up from #2807, which is still happening in the latest version (v1.0.0). I noticed this behavior because the EG is utilizing the Update API instead of the Patch API in infra-client.

if updateChecker() {
specific.SetUID(current.GetUID())
if err := cli.Client.Update(ctx, specific); err != nil {
return fmt.Errorf("for Update: %w", err)
}
}

As a result, instead of only updating the changed field, it turned out to re-applies all fields causing the field to revert to its original value, instead of updating what changed. For example on the Deployment object, if the replicas field is set to null, it will be reverted to null.

So, I tried in my local to use Patch API, and it worked as expected.

[optional Relevant Links:]

Any extra documentation required to understand the issue.

Metadata

Metadata

Assignees

Labels

area/infra-mgrIssues related to the provisioner used for provisioning the managed Envoy Proxy fleet.kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions