Skip to content

Add support for running the operator out of cluster #218

Merged
fanminshi merged 1 commit intooperator-framework:masterfrom
andersjanmyr:add_out_of_cluster_support
May 2, 2018
Merged

Add support for running the operator out of cluster #218
fanminshi merged 1 commit intooperator-framework:masterfrom
andersjanmyr:add_out_of_cluster_support

Conversation

@andersjanmyr
Copy link
Copy Markdown
Contributor

I like to be able to test locally before I deploy to the cluster. This PR allows this through an environment variable.

# Test the app-operator locally by setting KUBERNETES_CONFIG
$ KUBERNETES_CONFIG=~/.kube/config go run cmd/app-operator/main.go

@fanminshi
Copy link
Copy Markdown
Contributor

fanminshi commented May 2, 2018

We definitely like to have a better local testing/development workflow, see #142.

However, I think we should wrap the local testing/running of the operator into a CLI command such as operator-sdk up --kube-config=<your_config_file>

Comment thread README.md Outdated
$ cd app-operator

# Test the app-operator locally by setting KUBERNETES_CONFIG
$ KUBERNETES_CONFIG=~/.kube/config go run cmd/app-operator/main.go
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not add this KUBERNETES_CONFIG=~/.kube/config go run cmd/app-operator/main.go to the readme yet.

I want to wrap the above in a new operator-sdk up command. I will add that in a separate pr.

@fanminshi
Copy link
Copy Markdown
Contributor

Also follow the commit style here for your commits messages.

@andersjanmyr
Copy link
Copy Markdown
Contributor Author

👍

@fanminshi
Copy link
Copy Markdown
Contributor

@andersjanmyr Could you update the pr with my suggestion? or I can do it for you in this #220.

Allows testing the operator without dockerizing it and deploying it to a cluster.
@andersjanmyr andersjanmyr force-pushed the add_out_of_cluster_support branch from 8c09012 to 9803200 Compare May 2, 2018 21:03
@fanminshi
Copy link
Copy Markdown
Contributor

lgtm

@fanminshi fanminshi merged commit 0b429fb into operator-framework:master May 2, 2018
@andersjanmyr andersjanmyr deleted the add_out_of_cluster_support branch June 8, 2018 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants