Skip to content

Commit 4050b19

Browse files
hakuna-matatahHarish Kuna
andauthored
Bug fix ; Update heml repo;CP spec and DP spec; (#51)
* bug fix; add kit dp spec and cp spec for small cluster type. Co-authored-by: Harish Kuna <[email protected]>
1 parent 386c64a commit 4050b19

File tree

6 files changed

+111
-24
lines changed

6 files changed

+111
-24
lines changed

testbed/addons/kit/construct.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class Kit extends cdk.Construct {
7777
const chart = props.cluster.addHelmChart('kit', {
7878
chart: 'kit-operator',
7979
release: 'kit-operator',
80-
repository: 'https://github.com/awslabs/kubernetes-iteration-toolkit/tree/main/operator/charts/kit-operator',
80+
repository: 'https://awslabs.github.io/kubernetes-iteration-toolkit/',
8181
namespace: namespace,
8282
createNamespace: false,
8383
values: {

tests/pipelines/kit/upstream-load.yaml

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,27 @@ spec:
1717
- name: guest-cluster-region
1818
default: "us-west-2"
1919
description: The region where the kit cluster is created.
20-
- name: control-plane-spec
21-
description: url to the controlplane spec.
22-
- name: dataplane-spec
23-
description: url to the dataplane spec.
20+
- name: version
21+
default: "1.21"
22+
description: kubernetes version.
23+
- name: cp-instance-type
24+
default: "m5.8xlarge"
25+
description: control plane instance type.
26+
- name: max-requests-inflight
27+
default: "400"
28+
description: maximum number of inflight read request that apiserver could allow
29+
- name: max-mutating-requests
30+
default: "200"
31+
description: maximum number of mutating requests in flight that apiserver could allow
32+
- name: kcm-qps
33+
default: "20"
34+
description: Kubernetes-Controller-Manager QPS setting
35+
- name: scheduler-qps
36+
default: "20"
37+
description: Kubernetes-Scheduler QPS setting
38+
- name: node-count
39+
default: "1000"
40+
description: desired node count for Dataplane.
2441
- name: giturl
2542
description: "git url to clone the package"
2643
default: https://github.com/kubernetes/perf-tests.git
@@ -35,8 +52,6 @@ spec:
3552
default: "15"
3653
- name: results-bucket
3754
description: "Results bucket with path of s3 to upload results"
38-
- name: desired-nodes
39-
description: The desired number of nodes in the cluster which we define in DataPlane spec.
4055
tasks:
4156
- name: create-kit-cluster
4257
taskRef:
@@ -48,10 +63,20 @@ spec:
4863
value: '$(params.host-cluster-region)'
4964
- name: guest-cluster-region
5065
value: '$(params.guest-cluster-region)'
51-
- name: control-plane-spec
52-
value: '$(params.control-plane-spec)'
53-
- name: dataplane-spec
54-
value: '$(params.dataplane-spec)'
66+
- name: version
67+
value: '$(params.version)'
68+
- name: cp-instance-type
69+
value: '$(params.cp-instance-type)'
70+
- name: max-requests-inflight
71+
value: '$(params.max-requests-inflight)'
72+
- name: max-mutating-requests
73+
value: '$(params.max-mutating-requests)'
74+
- name: kcm-qps
75+
value: '$(params.kcm-qps)'
76+
- name: scheduler-qps
77+
value: '$(params.scheduler-qps)'
78+
- name: node-count
79+
value: '$(params.node-count)'
5580
workspaces:
5681
- name: config
5782
workspace: config
@@ -71,7 +96,7 @@ spec:
7196
- name: results-bucket
7297
value: '$(params.results-bucket)'
7398
- name: nodes
74-
value: '$(params.desired-nodes)'
99+
value: '$(params.node-count)'
75100
workspaces:
76101
- name: source
77102
workspace: source

tests/tasks/setup/kit-cluster/default.yaml

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,27 @@ spec:
1717
- name: guest-cluster-region
1818
default: "us-west-2"
1919
description: The region where the kit cluster is created.
20-
- name: control-plane-spec
21-
description: url to the controlplane spec.
22-
- name: dataplane-spec
23-
description: url to the dataplane spec.
20+
- name: version
21+
default: "1.21"
22+
description: kubernetes version.
23+
- name: cp-instance-type
24+
default: "m5.8xlarge"
25+
description: control plane instance type.
26+
- name: max-requests-inflight
27+
default: "400"
28+
description: maximum number of inflight read request that apiserver could allow
29+
- name: max-mutating-requests
30+
default: "200"
31+
description: maximum number of mutating requests in flight that apiserver could allow
32+
- name: kcm-qps
33+
default: "20"
34+
description: Kubernetes-Controller-Manager QPS setting
35+
- name: scheduler-qps
36+
default: "20"
37+
description: Kubernetes-Scheduler QPS setting
38+
- name: node-count
39+
default: "1000"
40+
description: desired node count for Dataplane.
2441
workspaces:
2542
- name: config
2643
description: |
@@ -35,9 +52,51 @@ spec:
3552
aws eks update-kubeconfig --name testbed --region $(params.host-cluster-region)
3653
kubectl config current-context
3754
#Provision a control plane for the guest cluster
38-
kubectl create -f $(params.control-plane-spec)
55+
cat > "$(workspaces.config.path)/cp.yaml" <<EOL
56+
apiVersion: kit.k8s.sh/v1alpha1
57+
kind: ControlPlane
58+
metadata:
59+
name: $(params.cluster-name) # Desired Cluster Name
60+
spec:
61+
kubernetesVersion: $(params.version)
62+
master:
63+
apiServer:
64+
spec:
65+
nodeSelector:
66+
node.kubernetes.io/instance-type: $(params.cp-instance-type)
67+
containers:
68+
- name: apiserver
69+
args:
70+
- --max-requests-inflight=$(params.max-requests-inflight)
71+
- --max-mutating-requests-inflight=$(params.max-mutating-requests)
72+
controllerManager:
73+
spec:
74+
containers:
75+
- name: controller-manager
76+
args:
77+
- --kube-api-qps=$(params.kcm-qps)
78+
scheduler:
79+
spec:
80+
containers:
81+
- name: scheduler
82+
args:
83+
- --kube-api-qps=$(params.scheduler-qps)
84+
EOL
85+
kubectl create -f $(workspaces.config.path)/cp.yaml
86+
87+
cat > "$(workspaces.config.path)/dp.yaml" <<EOL
88+
apiVersion: kit.k8s.sh/v1alpha1
89+
kind: DataPlane
90+
metadata:
91+
name: $(params.cluster-name)-nodes
92+
spec:
93+
clusterName: $(params.cluster-name) # Desired Cluster Name
94+
nodeCount: $(params.node-count)
95+
EOL
96+
3997
#Provision a dataplane plane for the guest cluster
40-
kubectl create -f $(params.dataplane-spec)
98+
kubectl create -f $(workspaces.config.path)/dp.yaml
99+
41100
#Get the admin KUBECONFIG for the guest cluster from the substrate cluster
42101
kubectl get secret $(params.cluster-name)-kube-admin-config -ojsonpath='{.data.config}' | base64 -d > $(workspaces.config.path)/kubeconfig
43102
#Deploy CNI plugin to the guest cluster for the nodes to be ready.

tests/tasks/teardown/kit.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ spec:
99
This Task can be used to teardown an KIT cluster in an AWS account.
1010
params:
1111
- name: cluster-name
12-
description: The name of the EKS cluster which will be teared down.
12+
description: The name of the kit cluster which will be teared down.
13+
- name: region
14+
default: us-west-2
15+
description: The region where the EKS/host cluster is in.
1316
steps:
1417
- name: delete-cluster
1518
image: amazon/aws-cli
1619
script: |
1720
kubectl version
18-
aws eks update-kubeconfig --name testbed --region $(params.host-cluster-region)
21+
aws eks update-kubeconfig --name testbed --region $(params.region)
1922
kubectl config current-context
2023
#delete kit controlplane spec and dataplane spec crds
2124
kubectl delete ControlPlane --name $(params.cluster-name)

tests/triggers/kit/small/upstream-load.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ spec:
5656
emptyDir: {}
5757
params:
5858
- name: cluster-name
59-
value: "kit-small"
59+
value: "kit-small-upstream-load-$(context.pipelineRun.uid)"
6060
- name: results-bucket
6161
value: "kit-scalability-dev/$(date +'%Y/%m/%d/%HH/%mm)/$(context.pipelineRun.uid)"

tests/triggers/kustomization.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- triggers/eks/small/upstream-load.yaml
5-
- triggers/rbac.yaml
6-
- triggers/kit/small/upstream-load.yaml
4+
- eks/small/upstream-load.yaml
5+
- rbac.yaml
6+
- kit/small/upstream-load.yaml

0 commit comments

Comments
 (0)