Skip to content

Add error to operator-builder CLI when cluster-scoped with no namespace resource #26

@lander2k2

Description

@lander2k2

If a code base using cluster-scoped workload is created without a namespace child resource included, we should throw an error. This is because the resulting operator could attempt to create resources in a namespace that doesn't exist.

We should add a force flag so operator developer can override in the case they have good controls for namespace creation.

Error message something like:

You are using a cluster-scoped workload without a namespace child resource.  This could result in your controller attempting to create resources in a non-existent namespace.  Add the --force-cluster-scoped-without-ns flag to ignore this error message.

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