Skip to content

operator-sdk up local failed to run #273

@fanminshi

Description

@fanminshi

Currently, the 8a1704d won't allow the operator-sdk up local to start the operator due to WATCH_NAMESPACE not set:

$ operator-sdk up local
INFO[0000] Go Version: go1.10
INFO[0000] Go OS/Arch: darwin/amd64
INFO[0000] operator-sdk Version: 0.0.5+git
FATA[0000] Failed to get watch namespace: WATCH_NAMESPACE must be set
exit status 1
Error: failed to run operator locally: exit status 1

The above issue is introduced at #227 when we change the behavior of operator getting its namespace value from the env variable instead of a hardcoded value.

A quick work around is to define the WATCH_NAMESPACE env var:

WATCH_NAMESPACE="default" operator-sdk up local

It might be nice to let the operator-sdk up local take in a flag --namespace to define where the operator watches the resource and set a default namespace value to default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions