Skip to content

What is the proper way to compare resource object? #592

@chenwng

Description

@chenwng

In the generated code, reflect.DeepEqual is used to check if the resource is changed. I created a deployment then used reflect.DeepEqual to compare it with the one fetched from k8s. The issue is the one fetched from k8s was changed by deployment controller (I assume it is) by filling with default values and is different from the deployment I constructed. This will trigger a update to deployment. And it seems this will happen continuously. Is this something expected? Or I am missing something?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/supportCategorizes issue or PR as a support question.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions