Switching `make` commands to `helm` commands. (#128)

* Switching `make` commands to `helm` commands.

Fixes https://github.com/kedacore/http-add-on/issues/117

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* adding mage version minimum

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
This commit is contained in:
Aaron Schlesinger 2021-04-14 10:41:36 -07:00 committed by GitHub
parent a98fe077c0
commit 8c60d9d6c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 23 deletions

View File

@ -36,8 +36,7 @@ Follow the [install instructions](./install.md) to check out how to install and
## Build scripts
This project uses [Mage](https://magefile.org) as opposed to Make because it's way faster to build and push images, as
well as to run tests and other common tasks. Please install it to have access to the task runner.
This project uses [Mage](https://magefile.org) as opposed to Make because it's way faster to build and push images, as well as to run tests and other common tasks. Please install [version v1.11.0](https://github.com/magefile/mage/releases/tag/v1.11.0) or above to have access to the task runner.
> **Note:** The Magefile located in the root directory is related to the whole project, so it gives you the ability to control the build and install process of all the modules in this project. On the other hand, the build binary located in the [operator](../operator/magefile.go) directory, is **just related to the operator module**.

View File

@ -17,7 +17,7 @@ Before you install any of these components, you need to install KEDA. Below are
```shell
helm repo add kedacore https://kedacore.github.io/charts
helm repo update
make helm-upgrade-keda
helm install keda kedacore/keda --namespace ${NAMESPACE} --set watchNamespace=${NAMESPACE}
```
>This document will rely on environment variables such as `${NAMESPACE}` to indicate a value you should customize and provide to the relevant command. In the above `helm install` command, `${NAMESPACE}` should be the namespace you'd like to install KEDA into. KEDA must be installed in every namespace that you'd like to host KEDA-HTTP powered apps.
@ -34,32 +34,28 @@ cd http-add-on
Next, install the HTTP add on. The below command will install the add on if it doesn't already exist:
```shell
make helm-upgrade-operator
helm install kedahttp ./charts/keda-http-operator -n ${NAMESPACE}
```
>Installing the HTTP add on won't affect any running workloads in your cluster. You'll need to install an `HTTPScaledObject` for each individual `Deployment` you want to scale. For more on how to do that, please see the [walkthrough](./walkthrough.md).
There are a few environment variables in the above command that you can set to customize how it behaves:
There are a few values that you can pass to the above `helm install` command by including `--set NAME=VALUE` on the command line.
- `NAMESPACE` - which Kubernetes namespace to install KEDA-HTTP. This should be the same as where you installed KEDA itself (required)
- `OPERATOR_DOCKER_IMG` - the name of the operator's Docker image (optional - falls back to the latest release)
- `SCALER_DOCKER_IMG` - the name of the scaler's Docker image (optional - falls back to the latest release)
- `INTERCEPTOR_DOCKER_IMG` - the name of the interceptor's Docker image (optional - falls back to the latest release)
- `images.operator` - the name of the operator's Docker image.
- The default is `ghcr.io/kedacore/http-add-on-operator:latest`, which maps to the latest release at [github.com/kedacore/http-add-on/releases](https://github.com/kedacore/http-add-on/releases)
- `images.scaler` - the name of the scaler's Docker image.
- The default is The default is `ghcr.io/kedacore/http-add-on-scaler:latest`, which maps to the latest release at [github.com/kedacore/http-add-on/releases](https://github.com/kedacore/http-add-on/releases)
- `images.interceptor` - the name of the interceptor's Docker image.
- The default is `ghcr.io/kedacore/http-add-on-interceptor:latest`, which maps to the latest release at [github.com/kedacore/http-add-on/releases](https://github.com/kedacore/http-add-on/releases)
#### A Note for Developers and Local Cluster Users
>I recommend using [direnv](https://direnv.net/) to store your environment variables
### If You're Installing into a [Microk8s](https://microk8s.io) Cluster
You might be working with a local development cluster like Microk8s, which offers a local, in-cluster registry. In this case, the previous `*_DOCKER_IMG` variables won't work for the Helm chart and you'll need to use a custom `helm` command such as the below:
Local clusters like [Microk8s](https://microk8s.io/) offer in-cluster image registries. These are popular tools to speed up and ease local development. If you use such a tool for local development, we recommend that you use and push your images to its local registry. When you do, you'll want to set your `images.*` variables to the address of the local registry. In the case of MicroK8s, that address is `localhost:32000` and the `helm install` command would look like the following:
```shell
helm upgrade kedahttp ./charts/keda-http-operator \
--install \
--namespace ${NAMESPACE} \
--create-namespace \
--set image=localhost:32000/keda-http-operator \
--set images.scaler=localhost:32000/keda-http-scaler \
--set images.interceptor=localhost:32000/keda-http-interceptor
helm install kedahttp ./charts/keda-http-operator \
-n ${NAMESPACE} \
--set images.operator=localhost:32000/keda-http-operator \
--set images.scaler=localhost:32000/keda-http-scaler \
--set images.interceptor=localhost:32000/keda-http-interceptor
```
In the above command, `localhost:32000` is the address of the registry from inside a Microk8s cluster.