Skip to content

operator-sdk new should also generate deepcopy functions for custom resource #107

@fanminshi

Description

@fanminshi

The current operator-sdk generates a skeleton that doesn't include deepcopy functions for the custom resource. It is still compilable because non of the custom resource objects are being used by sdk.Watch() on default. However, if user changes sdk.Watch() to watch on the custom resource and then converts the watched object to the custom resource type, then the code becomes non-compilable.

To resolve this potential issue, the operator-sdk new should generate deepcopy functions for the custom resource when creating a new project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions