Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 89f2856

Browse files
mra-ruizk8s-ci-robot
authored andcommitted
fix(plugins/plugin-kubectl): Adding Autoscaling using Go guidebook
1 parent cc5108b commit 89f2856

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

plugins/plugin-client-default/config.d/notebooks.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
"label": "Knative Serving Examples",
6969
"expanded": false,
7070
"submenu": [
71-
{ "notebook": "Hello World Deployment", "filepath": "/kui/kubernetes/knative-serving-hello-world.md" }
71+
{ "notebook": "Hello World Deployment", "filepath": "/kui/kubernetes/knative-serving-hello-world.md" },
72+
{ "notebook": "Autoscaling Using Go", "filepath": "/kui/kubernetes/knative-serving-autoscaling-go.md" }
7273
]
7374
}
7475
]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Autoscaling Using Go
3+
layout:
4+
1: left
5+
2: right
6+
default: wizard
7+
wizard:
8+
steps:
9+
- match: Prerequisites
10+
name: Install Required Tools
11+
- name: Deploy the Service
12+
- name: Load the Service
13+
- match: Analysis
14+
name: Analysis - Algorithm
15+
- name: Other Experiments
16+
describe: Run experiments to better understand analysis
17+
- name: Cleanup
18+
- name: Further reading
19+
codeblocks:
20+
# Validation for Step 1: Install Required Tools
21+
- match: ^git clone -b "{{ branch }}" https://github.com/knative/docs knative-docs
22+
cd knative-docs$
23+
validate: $? -e 0 && exit 0 \|\| exit 1
24+
# Validation for Step 2: Deploy the Service
25+
- match: ^kubectl apply -f docs/serving/autoscaling/autoscale-go/service.yaml$
26+
validate: kn service describe service
27+
- match: ^kubectl get ksvc autoscale-go$
28+
validate: $? -e 0 && exit 0 \|\| exit 1
29+
# Validation for Step 3: Load the Service
30+
- match: ^curl "http://autoscale-go.default.1.2.3.4.sslip.io?sleep=100&prime=10000&bloat=5"$
31+
validate: $body
32+
- match: ^hey -z 30s -c 50
33+
validate: $? -e 0 && exit 0 \|\| exit 1
34+
# Validation for Step 5: Other Experiments
35+
- match: ^hey -z 60s -c 100
36+
validate: $? -e 0 && exit 0 \|\| exit 1
37+
- match: ^hey -z 60s -q 100
38+
validate: $? -e 0 && exit 0 \|\| exit 1
39+
- match: ^hey -z 60s -q 100
40+
validate: $? -e 0 && exit 0 \|\| exit 1
41+
- match: ^hey -z 60s -q 100
42+
validate: $? -e 0 && exit 0 \|\| exit 1
43+
- match: ^hey -z 60s -c 5
44+
validate: $? -e 0 && exit 0 \|\| exit 1
45+
# Validation for Step 6: Cleanup
46+
- match: ^kubectl delete -f docs/serving/autoscaling/autoscale-go/service.yaml$
47+
validate: $? -e 0 && exit 0 \|\| exit 1
48+
---
49+
50+
--8<-- "https://raw.githubusercontent.com/mra-ruiz/docs/guidebooks/docs/guidebooks/knative-serving-autoscaling-go.md"

plugins/plugin-kubectl/src/non-headless-preload.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export default async (registrar: PreloadRegistrar) => {
8585
'plugin://plugin-kubectl/notebooks/knative-first-trigger.md',
8686
'plugin://plugin-kubectl/notebooks/knative-whats-next.md',
8787
'plugin://plugin-kubectl/notebooks/knative-serving-hello-world.md',
88+
'plugin://plugin-kubectl/notebooks/knative-serving-autoscaling-go.md',
8889
'plugin://plugin-kubectl/notebooks/create-jobs.md',
8990
'plugin://plugin-kubectl/notebooks/create-jobs.json',
9091
'plugin://plugin-kubectl/notebooks/crud-operations.md',

0 commit comments

Comments
 (0)