This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2140 from bzon/enable-local-development
Enable connection to a Remote Cluster for easy development
- Loading branch information
Showing
3 changed files
with
107 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,19 @@ This guide shows a workflow for making a small (actually, tiny) change to Flux, | |
> 1. make a change to the code | ||
> 1. see your code changes have been deployed | ||
> 1. repeat | ||
> 1. Remote cluster development approach: | ||
> 1. ensure local kubectl access to a remote kubernetes cluster. | ||
> 1. have an available local memcached instance. | ||
> 1. make a change to the code | ||
> 1. ```bash | ||
> go run cmd/fluxd/main.go \ | ||
> --memcached-hostname localhost \ | ||
> --memcached-port 11211 \ | ||
> --memcached-service "" \ | ||
> --git-url [email protected]:weaveworks/flux-get-started \ | ||
> --k8s-in-cluster=false | ||
> ``` | ||
> 1. repeat | ||
> 1. Use `helm` and `skaffold` together to deploy changes to the Flux helm chart. | ||
> 1. `make` | ||
> 1. make a change to the code | ||
|
@@ -82,7 +95,7 @@ Now that we know everything is working with `flux-getting-started`, we're going | |
1. Clone `[email protected]:<YOUR-GITHUB-USERNAME>/flux.git` replacing `<YOUR-GITHUB-USERNAME>` with your GitHub username. | ||
In the same terminal you ran `eval $(minikube docker-env)`, run `dep ensure` followed by `make` from the root directory of the Flux repo. You'll see docker's usual output as it builds the image layers. Once it's done, you should see something like this in the middle of the output: | ||
In the same terminal you ran `eval $(minikube docker-env)`, run `GO111MODULE=on go mod download` followed by `make` from the root directory of the Flux repo. You'll see docker's usual output as it builds the image layers. Once it's done, you should see something like this in the middle of the output: | ||
``` | ||
Successfully built 606610e0f4ef | ||
Successfully tagged docker.io/weaveworks/flux:latest | ||
|
@@ -183,4 +196,4 @@ Now that we know everything is working with `flux-getting-started`, we're going | |
## Congratulations! | ||
You have now modified Flux and deployed that change locally. From here on out, you simply need to run `make` after you save your changes and wait a few seconds for your new pod to be deployed to minikube. Keep in mind, that (as in the situation where you run `make` without saving any changes) if the docker image you pointed to in the Kubernetes deployment for Flux is not Successfully tagged, `freshpod` won't have anything new to deploy. Other than that, you should be good to go! | ||
You have now modified Flux and deployed that change locally. From here on out, you simply need to run `make` after you save your changes and wait a few seconds for your new pod to be deployed to minikube. Keep in mind, that (as in the situation where you run `make` without saving any changes) if the docker image you pointed to in the Kubernetes deployment for Flux is not Successfully tagged, `freshpod` won't have anything new to deploy. Other than that, you should be good to go! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters