Skip to content

Commit 7fed8bc

Browse files
authored
Misc. doc changes for consistency and clarity. (#496)
1 parent 272b67f commit 7fed8bc

11 files changed

+156
-97
lines changed

ADOPTERS.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# KEDA HTTP Add-On Adopters
1+
# KEDA HTTP Add-on Adopters
22

3-
This page contains a list of organizations who are using KEDA's HTTP Add-On in production or at stages of testing.
3+
This page contains a list of organizations who are using KEDA's HTTP Add-on in production or at stages of testing.
44

55
## Adopters
66

@@ -12,7 +12,7 @@ This page contains a list of organizations who are using KEDA's HTTP Add-On in p
1212

1313
You can easily become an adopter by sending a pull request to this file.
1414

15-
These are the adoption statusses that you can use:
15+
These are the adoption statuses that you can use:
1616

1717
- ![production](https://img.shields.io/badge/-production-blue?style=flat)
1818
- ![testing](https://img.shields.io/badge/-development%20&%20testing-green?style=flat)

CONTRIBUTING.md

+37-30
Original file line numberDiff line numberDiff line change
@@ -42,36 +42,43 @@ Please find it at [docs/developing.md](./docs/developing.md).
4242

4343
### Pre-requisite:
4444

45-
- A running cluster with Keda installed.
45+
- A running Kubernetes cluster with KEDA installed.
4646
- [Mage](https://magefile.org/)
4747
- [Helm](https://helm.sh/)
48-
- [k9s](https://github.com/derailed/k9s)
48+
- [k9s](https://github.com/derailed/k9s) (_optional_)
4949
- Set the required environment variables explained [here](https://github.com/kedacore/http-add-on/blob/main/docs/developing.md#required-environment-variables).
5050

51-
### Building:
51+
### Building:
5252

53-
- Fork & clone the repo : https://github.com/kedacore/http-add-on.git
54-
- cd http-add-on
55-
- Use Mage to build with :
56-
```
57-
mage build: build local binaries
58-
mage dockerBuild: build docker images of the components
53+
- Fork & clone the repo:
54+
```console
55+
$ git clone https://github.com/<your-username>/http-add-on.git
56+
```
57+
- Change into the repo directory:
58+
```console
59+
$ cd http-add-on
60+
```
61+
- Use Mage to build with:
62+
```console
63+
$ mage build # build local binaries
64+
$ mage dockerBuild # build docker images of the components
5965
```
6066
If the environment variables are not setup , the docker build will fail so remember to export the right variable values.
6167

6268
### Deploying:
6369

64-
Custom KEDA-http-addon as an image
70+
Custom HTTP Add-on as an image
6571

6672
- Make your changes in the code
67-
- Build and publish images with your changes, remember to set your environment variables for images as per the registry of your choice and run
68-
```
73+
- Build and publish images with your changes, remember to set your environment variables for images as per the registry of your choice and run
74+
```console
6975
$ mage dockerBuild
7076
```
71-
If you want to deploy with docker or any other registry of your choice then use right address in setting the images.
77+
If you want to deploy with docker or any other registry of your choice then use right address in setting the images.
78+
79+
There are local clusters with local registries provided, in such cases make sure to use and push your images to its local registry. In the case of MicroK8s, the address is `localhost:32000` and the helm install command would look like the following.
7280

73-
There are local clusters with local registries provided, in such cases make sure to use and push your images to its local registry. In the case of MicroK8s, the address is localhost:32000 and the helm install command would look like the following.
74-
```
81+
```console
7582
$ helm repo add kedacore https://kedacore.github.io/charts
7683
$ helm repo update
7784
$ helm pull kedacore/keda-add-ons-http --untar --untardir ./charts
@@ -82,22 +89,22 @@ $ helm upgrade kedahttp ./charts/keda-add-ons-http \
8289
--set image=localhost:32000/keda-http-operator \
8390
--set images.scaler=localhost:32000/keda-http-scaler \
8491
--set images.interceptor=localhost:32000/keda-http-interceptor
85-
```
86-
If you want to install the latest build of the HTTP Add on, set version to canary:
87-
```
92+
```
93+
If you want to install the latest build of the HTTP Add-on, set version to `canary`:
94+
```console
8895
$ helm install http-add-on kedacore/keda-add-ons-http --create-namespace --namespace ${NAMESPACE} --set images.tag=canary
8996
```
9097
### Load testing with k9s:
9198

9299
K9s integrates Hey, a CLI tool to benchmark HTTP endpoints similar to AB bench. This preliminary feature currently supports benchmarking port-forwards and services. You can use this feature in load testing as follows:
93100

94-
- Install an application to scale: we used the sample provided for which you have to clone
95-
```
101+
- Install an application to scale, we use the provided sample -
102+
```console
96103
$ helm install xkcd ./examples/xkcd -n ${NAMESPACE}
97104
```
98-
- You'll need to clone the repository to get access to this chart. If you have your own Deployment and Service installed, you can go right to creating an HTTPScaledObject by
105+
- You'll need to clone the repository to get access to this chart. If you have your own Deployment and Service installed, you can go right to creating an HTTPScaledObject. We use the provided sample HTTPScaledObject -
99106
```
100-
$ kubectl create -n $NAMESPACE -f examples/v0.2.0/httpscaledobject.yaml
107+
$ kubectl create -n $NAMESPACE -f examples/v0.3.0/httpscaledobject.yaml
101108
```
102109
- Testing Your Installation using k9s:
103110
```
@@ -112,7 +119,7 @@ K9s integrates Hey, a CLI tool to benchmark HTTP endpoints similar to AB bench.
112119
(e) Enter the port-forward and apply <CTRL+L> to start a benchmark
113120
114121
(f) You can enter the port-forward to see the run stat details and performance.
115-
```
122+
```
116123
>You can customize the benchmark in k9s also. It's explained well in [here](https://k9scli.io/topics/bench/).
117124
118125
## Developer Certificate of Origin: Signing your work
@@ -143,7 +150,7 @@ Signed-off-by: Random J Developer <[email protected]>
143150

144151
Git even has a `-s` command line option to append this automatically to your commit message:
145152

146-
```
153+
```console
147154
$ git commit -s -m 'This is my commit message'
148155
```
149156

@@ -153,10 +160,10 @@ Each Pull Request is checked whether or not commits in a Pull Request do contain
153160

154161
No worries - You can easily replay your changes, sign them and force push them!
155162

156-
```
157-
git checkout <branch-name>
158-
git reset $(git merge-base main <branch-name>)
159-
git add -A
160-
git commit -sm "one commit on <branch-name>"
161-
git push --force
163+
```console
164+
$ git checkout <branch-name>
165+
$ git reset $(git merge-base main <branch-name>)
166+
$ git add -A
167+
$ git commit -sm "one commit on <branch-name>"
168+
$ git push --force
162169
```

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ The KEDA HTTP Add-on allows Kubernetes users to automatically scale their HTTP s
77

88
| 🚧 **Project status: beta** 🚧|
99
|---------------------------------------------|
10-
| ⚠ The HTTP Add-on currently is in [beta](https://github.com/kedacore/http-add-on/releases/tag/v0.1.0). We can't yet recommend it for production usage because we are still developing and testing it. It may have "rough edges" including missing documentation, bugs and other issues. It is currently provided as-is without support.
10+
| ⚠ The HTTP Add-on currently is in [beta](https://github.com/kedacore/http-add-on/releases/latest). We can't yet recommend it for production usage because we are still developing and testing it. It may have "rough edges" including missing documentation, bugs and other issues. It is currently provided as-is without support.
1111

1212
## HTTP Autoscaling Made Simple
1313

14-
[KEDA](https://github.com/kedacore/keda) provides a reliable and well tested solution to scaling your workloads based on external events. The project supports a wide variety of [scalers](https://keda.sh/docs/2.2/scalers/) - sources of these events, in other words. These scalers are systems that produce precisely measurable events via an API.
14+
[KEDA](https://github.com/kedacore/keda) provides a reliable and well tested solution to scaling your workloads based on external events. The project supports a wide variety of [scalers](https://keda.sh/docs/latest/scalers/) - sources of these events, in other words. These scalers are systems that produce precisely measurable events via an API.
1515

1616
KEDA does not, however, include an HTTP-based scaler out of the box for several reasons:
1717

@@ -25,13 +25,13 @@ This project, often called KEDA-HTTP, exists to provide that scaling. It is comp
2525

2626
## Adopters - Become a listed KEDA user!
2727

28-
We are always happy to start list users who run KEDA's HTTP Add-On in production or are evaluating it, learn more about it [here](ADOPTERS.md).
28+
We are always happy to start list users who run KEDA's HTTP Add-on in production or are evaluating it, learn more about it [here](ADOPTERS.md).
2929

3030
We welcome pull requests to list new adopters.
3131

3232
## Walkthrough
3333

34-
Although this is currently a **beta release** project, we have prepared a walkthrough document that with instructions on getting started for basic usage.
34+
Although this is currently a **beta release** project, we have prepared a walkthrough document with instructions on getting started for basic usage.
3535

3636
See that document at [docs/walkthrough.md](./docs/walkthrough.md)
3737

RELEASE-PROCESS.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The process of releasing a new version of the KEDA HTTP Add-on involves a few st
66
77
## 1: Current and new versions
88

9-
Please go to the [releases page](https://github.com/kedacore/http-add-on/releases) and observe what the most recent release is. Specifically, note what the _tag_ of the release is. For example, if [version 0.1.0](https://github.com/kedacore/http-add-on/releases/tag/v0.1.0) is the latest release (it is as the time of this writing), the tag for that is `v0.1.0`.
9+
Please go to the [releases page](https://github.com/kedacore/http-add-on/releases) and observe what the most recent release is. Specifically, note what the _tag_ of the release is. For example, if [version 0.3.0](https://github.com/kedacore/http-add-on/releases/tag/v0.3.0) is the latest release (it is as the time of this writing), the tag for that is `v0.3.0`.
1010

1111
To determine the new version, follow [SemVer guidelines](https://semver.org). Most releases will increment the PATCH or MINOR version number.
1212

@@ -16,7 +16,7 @@ To determine the new version, follow [SemVer guidelines](https://semver.org). Mo
1616

1717
The title of the release should be "Version 1.2.3", substituting `1.2.3` with the new version number, and the Git tag should be `v1.2.3`, again substituting `1.2.3` with your new version number.
1818

19-
The release description should be a short to medium length summary of what has changed since the last release. The following link will give you a list of commits made since the `v0.1.0` tag: [github.com/kedacore/http-add-on/compare/v0.1.0...main](https://github.com/kedacore/http-add-on/compare/v0.1.0...main). Replace `v0.1.0` for your appropriate most recent last tag to get the commit list and base your release summary on that list.
19+
The release description should be a short to medium length summary of what has changed since the last release. The following link will give you a list of commits made since the `v0.3.0` tag: [github.com/kedacore/http-add-on/compare/v0.3.0...main](https://github.com/kedacore/http-add-on/compare/v0.3.0...main). Replace `v0.3.0` for your appropriate most recent last tag to get the commit list and base your release summary on that list.
2020

2121
After you create the new release, automation in a GitHub action will build and deploy new container images.
2222

@@ -44,7 +44,7 @@ images:
4444
tag: 1.2.3
4545
```
4646
47-
>Note: the container images generated by CI/CD in step 2 will have the same tag as the tag you created in the release, minus the `v` prefix. You can always see what images created by going to the container registry page for the [interceptor](https://github.com/orgs/kedacore/packages/container/package/http-add-on-interceptor), [operator](https://github.com/kedacore/http-add-on/pkgs/container/http-add-on-operator) or [scaler](https://github.com/kedacore/http-add-on/pkgs/container/http-add-on-scaler)
47+
>Note: The container images generated by CI/CD in step 2 will have the same tag as the tag you created in the release, minus the `v` prefix. You can always see what images created by going to the container registry page for the [interceptor](https://github.com/orgs/kedacore/packages/container/package/http-add-on-interceptor), [operator](https://github.com/kedacore/http-add-on/pkgs/container/http-add-on-operator) or [scaler](https://github.com/kedacore/http-add-on/pkgs/container/http-add-on-scaler)
4848

4949

5050
Once you've made changes to the chart, here's how to do submit the change to the charts repository:

docs/design.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ There are three major components in this system. You can find more detail and di
88

99
- [Operator](../operator) - This component listens for events related to `HTTPScaledObject`s and creates, updates or removes internal machinery as appropriate.
1010
- [Interceptor](../interceptor) - This component accepts and routes external HTTP traffic to the appropriate internal application, as appropriate.
11-
- [Scaler](../scaler) - This component tracks the size of the pending HTTP request queue for a given app and reports it to KEDA. It acts as an [external scaler](https://keda.sh/docs/2.1/scalers/external-push/).
11+
- [Scaler](../scaler) - This component tracks the size of the pending HTTP request queue for a given app and reports it to KEDA. It acts as an [external scaler](https://keda.sh/docs/latest/scalers/external-push/).
1212
- [KEDA](https://keda.sh) - KEDA acts as the scaler for the user's HTTP application.
1313

1414
## Functionality Areas
@@ -35,7 +35,7 @@ The interceptor keeps track of the number of pending HTTP requests - HTTP reques
3535

3636
#### The Horizontal Pod Autoscaler
3737

38-
The HTTP Add-on works with the Kubernetes [Horizonal Pod Autoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details) (HPA) -- via KEDA itself -- to execute scale-up and scale-down operations (except for scaling between zero and non-zero replicas). The add-on furnishes KEDA with two metrics - the current number of pending requests for a host, and the desired number (called `targetPendingRequests` in the [HTTPScaledObject](./ref/v0.2.0/http_scaled_object.md)). KEDA then sends these metrics to the HPA, which uses them as the `currentMetricValue` and `desiredMetricValue`, respectively, in the [HPA Algorithm](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details).
38+
The HTTP Add-on works with the Kubernetes [Horizonal Pod Autoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details) (HPA) -- via KEDA itself -- to execute scale-up and scale-down operations (except for scaling between zero and non-zero replicas). The add-on furnishes KEDA with two metrics - the current number of pending requests for a host, and the desired number (called `targetPendingRequests` in the [HTTPScaledObject](./ref/v0.3.0/http_scaled_object.md)). KEDA then sends these metrics to the HPA, which uses them as the `currentMetricValue` and `desiredMetricValue`, respectively, in the [HPA Algorithm](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details).
3939

4040
The net effect is that the add-on scales up when your app grows to more pending requests than the `targetPendingRequests` value, and scales down when it has fewer than that value.
4141

docs/developing.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ The most useful and common commands from the root directory are listed below. Pl
5252
5353
- `mage build`: Builds all the binaries for local testing.
5454
- `mage test`: Tests the entire codebase
55-
- `mage dockerbuild`: Builds all docker images
55+
- `mage dockerBuild`: Builds all docker images
5656
- Please see the below "Environment Variables" section for more information on this command
57-
- `mage dockerpush`: Pushes all docker images, without building them first
57+
- `mage dockerPush`: Pushes all docker images, without building them first
5858
- Please see the below "Environment Variables" section for more information on this command
5959

6060
### In the Operator Directory
@@ -88,7 +88,7 @@ We'll also assume that you have set the `$NAMESPACE` environment variable in you
8888

8989
To establish one, run the following command in a separate terminal window:
9090

91-
```shell
91+
```console
9292
kubectl proxy -p 9898
9393
```
9494

@@ -98,9 +98,9 @@ kubectl proxy -p 9898
9898

9999
The second way to communicate with these services is almost the opposite as the previous. Instead of bringing the API server to you with `kubectl proxy`, you'll be creating an execution environment closer to the API server.
100100

101-
First, launch a container with an interactive shell in Kubernetes with the following command (substituting your namespace in for `$NAMESPACE`):
101+
First, launch a container with an interactive console in Kubernetes with the following command (substituting your namespace in for `$NAMESPACE`):
102102

103-
```shell
103+
```console
104104
kubectl run -it alpine --image=alpine -n $NAMESPACE
105105
```
106106

@@ -119,37 +119,37 @@ The admin server also performs following tasks:
119119

120120
Run the following `curl` command to get the running configuration of the interceptor:
121121

122-
```shell
122+
```console
123123
curl -L localhost:9898/api/v1/namespaces/$NAMESPACE/services/keda-add-ons-http-interceptor-admin:9090/proxy/config
124124
```
125125

126126
#### Routing Table
127127

128128
To prompt the interceptor to fetch the routing table, then print it out:
129129

130-
```shell
130+
```console
131131
curl -L localhost:9898/api/v1/namespaces/$NAMESPACE/services/keda-add-ons-http-interceptor-admin:9090/proxy/routing_ping
132132
```
133133

134134
Or, to just ask the interceptor to print out its routing table:
135135

136-
```shell
136+
```console
137137
curl -L localhost:9898/api/v1/namespaces/$NAMESPACE/services/keda-add-ons-http-interceptor-admin:9090/proxy/routing_table
138138
```
139139

140140
#### Queue Counts
141141

142142
To fetch the state of an individual interceptor's pending HTTP request queue:
143143

144-
```shell
144+
```console
145145
curl -L localhost:9898/api/v1/namespaces/$NAMESPACE/services/keda-add-ons-http-interceptor-admin:9090/proxy/queue
146146
```
147147

148148
#### Deployment Cache
149149

150150
To fetch the current state of an individual interceptor's deployment queue:
151151

152-
```shell
152+
```console
153153
curl -L localhost:9898/api/v1/namespaces/$NAMESPACE/services/keda-add-ons-http-interceptor-admin:9090/proxy/deployments
154154
```
155155

@@ -163,7 +163,7 @@ Like the interceptor, the operator has an admin server that has HTTP endpoints a
163163

164164
Run the following `curl` command to get the running configuration of the operator:
165165

166-
```shell
166+
```console
167167
curl -L localhost:9898/api/v1/namespaces/$NAMESPACE/services/keda-add-ons-http-operator-admin:9090/proxy/config
168168
```
169169

@@ -173,7 +173,7 @@ The operator has a similar `/routing_table` endpoint as the interceptor. That da
173173

174174
Fetch the operator's routing table with the following command:
175175

176-
```shell
176+
```console
177177
curl -L localhost:9898/api/v1/namespaces/$NAMESPACE/services/keda-add-ons-http-operator-admin:9090/proxy/routing_table
178178
```
179179

@@ -183,9 +183,9 @@ Like the interceptor, the scaler has an HTTP admin interface against which you c
183183

184184
#### Configuration
185185

186-
Run the following `curl` command to get the running configuration of the interceptor:
186+
Run the following `curl` command to get the running configuration of the scaler:
187187

188-
```shell
188+
```console
189189
curl -L localhost:9898/api/v1/namespaces/$NAMESPACE/services/keda-add-ons-http-external-scaler:9091/proxy/config
190190
```
191191

@@ -195,12 +195,12 @@ The external scaler fetches pending queue counts from each interceptor in the sy
195195

196196
For convenience, the scaler also provides a plain HTTP server from which you can also fetch these metrics. Fetch the queue counts from this HTTP server with the following command:
197197

198-
```shell
198+
```console
199199
curl -L localhost:9898/api/v1/namespaces/$NAMESPACE/services/keda-add-ons-http-external-scaler:9091/proxy/queue
200200
```
201201

202202
Alternatively, you can prompt the scaler to fetch counts from all interceptors, aggregate, store, and return counts:
203203

204-
```shell
204+
```console
205205
curl -L localhost:9898/api/v1/namespaces/$NAMESPACE/services/keda-add-ons-http-external-scaler:9091/proxy/queue_ping
206206
```

0 commit comments

Comments
 (0)