Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Commit

Permalink
add contributing file
Browse files Browse the repository at this point in the history
  • Loading branch information
jsturtevant committed Aug 9, 2018
1 parent 223491b commit df78b1a
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Dockerfile
Makefile
README.md
skaffold.yaml
samples/
samples/
CONTRIBUTING.md
67 changes: 67 additions & 0 deletions CONTRIBUTING.md
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
```
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,24 +161,10 @@ The use the adapter your Azure Subscription must be provided. There are a few w
- [Azure Instance Metadata](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service) - If you are running the adapter on a VM in Azure (for instance in an AKS cluster) there is nothing you need to do. The Subscription Id will be automatically picked up from the Azure Instance Metadata endpoint
- Environment Variable - If you are outside of Azure or want full control of the subscription that is used you can set the Environment variable `SUBSCRIPTION_ID` on the adapter deployment. This takes precedence over the Azure Instance Metadata.
- [On each HPA](samples/hpa-examples) - you can work with multiple subscriptions by supplying the metric selector `subscriptionID` on each HPA. This overrides Environment variables and Azure Instance Metadata settings.

## Development

### Get the source
## Contributing

```bash
go get github.com/jsturtevant/azure-k8-metrics-adapter
cd $GOPATH/github.com/jsturtevant/azure-k8-metrics-adapter
```

### Use Skaffold
Before you run the command below be sure to:
See [Contributing](CONTRIBUTING.md) for more information.

- 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
```

0 comments on commit df78b1a

Please sign in to comment.