This repository has been archived by the owner on Jan 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
223491b
commit df78b1a
Showing
3 changed files
with
71 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ Dockerfile | |
Makefile | ||
README.md | ||
skaffold.yaml | ||
samples/ | ||
samples/ | ||
CONTRIBUTING.md |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Contributing | ||
|
||
This project welcomes contributions and suggestions. Most contributions require you to | ||
agree to a Contributor License Agreement (CLA) declaring that you have the right to, | ||
and actually do, grant us the rights to use your contribution. For details, visit | ||
https://cla.microsoft.com. | ||
|
||
When you submit a pull request, a CLA-bot will automatically determine whether you need | ||
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the | ||
instructions provided by the bot. You will only need to do this once across all repositories using our CLA. | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) | ||
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. | ||
|
||
## Development | ||
To do development you will need: | ||
|
||
- [Golang](https://golang.org/doc/install) - same as current [Kubernetes version ](https://github.com/kubernetes/community/blob/master/contributors/devel/development.md#go) | ||
- Kubernetes cluster - [minikube](https://github.com/kubernetes/minikube) or [AKS](https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough) or any other cluster | ||
|
||
### Get the source | ||
|
||
```bash | ||
go get github.com/jsturtevant/azure-k8-metrics-adapter | ||
cd $GOPATH/github.com/jsturtevant/azure-k8-metrics-adapter | ||
``` | ||
|
||
### Building the project | ||
To build the project locally, with out creating a docker image: | ||
|
||
```bash | ||
make build-local | ||
``` | ||
|
||
To build the docker image use: | ||
|
||
```bash | ||
export REGISTRY=<your registry name> | ||
export IMAGE=azure-k8-metrics-adapter-testimage | ||
make build | ||
``` | ||
|
||
You can then login into your registry (`docker login`) and run: | ||
|
||
```bash | ||
make push | ||
``` | ||
|
||
## Adding dependencies | ||
|
||
Add the dependency to the Gopkg.toml file and then run: | ||
|
||
``` | ||
make vendor | ||
``` | ||
|
||
### Use Skaffold | ||
To create a fast dev cycle you can use skaffold. Before you run the command below be sure to: | ||
|
||
- Download [skaffold](https://github.com/GoogleContainerTools/skaffold#installation) | ||
- Log in to your container registry: `docker login` | ||
- Have your K8 context set to the cluster you want to deploy to: `kubectl config use-context` | ||
|
||
```bash | ||
make dev | ||
``` |
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