-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
draft: kit tasks #352
Draft
mengqiy
wants to merge
1
commit into
awslabs:main
Choose a base branch
from
mengqiy:polishkittask
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
draft: kit tasks #352
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: kit-cl2-load-example-run | ||
namespace: tekton-pipelines | ||
spec: | ||
timeout: "12h" | ||
workspaces: | ||
- name: source | ||
emptyDir: {} | ||
- name: results | ||
emptyDir: {} | ||
- name: kubeconfig | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: kit-gp2 | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
params: | ||
- name: name | ||
value: "my-cluster-name" | ||
- name: "results-bucket" | ||
value: "my-bucket" | ||
- name: "node_count" | ||
value: "100" | ||
- name: "amp-workspace-id" | ||
value: "my-AMP-workspace" | ||
podTemplate: | ||
nodeSelector: | ||
kubernetes.io/arch: amd64 | ||
# TODO: The mounted EBS PV is only writable to root, ideally we should avoid to run containers as root. | ||
securityContext: | ||
runAsNonRoot: false | ||
runAsUser: 0 | ||
serviceAccountName: tekton-pipelines-executor | ||
pipelineRef: | ||
name: kit-cl2-load |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,237 @@ | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Pipeline | ||
metadata: | ||
name: kit-cl2-load | ||
namespace: tekton-pipelines | ||
spec: | ||
workspaces: | ||
- name: source | ||
- name: results | ||
- name: kubeconfig | ||
params: | ||
- name: name | ||
description: The name of the test cluster. | ||
default: "guest" | ||
- name: amp-workspace-id | ||
description: The AMP workspace ID where remote write needs to happen. | ||
- name: node_count | ||
description: desired node count for Dataplane, min is 1000 to create DP nodes. | ||
- name: kubernetes-version | ||
default: "1.24" | ||
description: Kubernetes version for the guest cluster. | ||
- name: apiserver-replicas | ||
description: "Desired replicas of the APIServer" | ||
default: "2" | ||
- name: apiserver-image | ||
default: "" | ||
description: Image of apiserver | ||
- name: apiserver-parameters | ||
default: "" | ||
description: | | ||
Parameters of the apiserver. e.g. '["--goaway-chance=0.01"]' | ||
- name: apiserver-instance-type | ||
default: "m5.2xlarge" | ||
description: Instance type for the apiserver | ||
- name: etcd-replicas | ||
default: "3" | ||
description: Number of ETCD replicas | ||
- name: etcd-image | ||
default: "" | ||
description: Image of ETCD | ||
- name: etcd-parameters | ||
default: "" | ||
description: Parameters of the ETCD container | ||
- name: etcd-instance-type | ||
default: "m5.xlarge" | ||
description: Instance type for the ETCD | ||
- name: aws-vpc-cni-version | ||
default: release-1.10 | ||
description: The release version for aws vpc cni. | ||
- name: aws-ebs-csi-driver-version | ||
default: release-1.13 | ||
description: The release version for aws ebs csi driver. | ||
- name: monitoring-node-instance-types | ||
default: | | ||
["m5.4xlarge"] | ||
description: The desired instance type of the monitoring node. | ||
- name: monitoring-node-selectors | ||
default: 'node.kubernetes.io/instance-type=m5.4xlarge' | ||
description: The selectors to select the monitoring node for tainting. | ||
- name: giturl | ||
description: "git url to clone the package" | ||
default: https://github.com/kubernetes/perf-tests.git | ||
- name: cl2-branch | ||
description: "The branch of clusterloader2 you want to use" | ||
default: "master" | ||
- name: pods-per-node | ||
description: "pod density" | ||
default: "10" | ||
- name: nodes-per-namespace | ||
description: "nodes per namespace to get created for load test " | ||
default: "100" | ||
- name: cl2-load-test-throughput | ||
description: "throughput used for mutate operations" | ||
default: "15" | ||
- name: results-bucket | ||
description: "Results bucket with path of s3 to upload results" | ||
tasks: | ||
- name: setup-control-plane | ||
taskRef: | ||
kind: Task | ||
name: control-plane-setup | ||
params: | ||
- name: name | ||
value: '$(params.name)' | ||
- name: kubernetes-version | ||
value: '$(params.kubernetes-version)' | ||
- name: apiserver-replicas | ||
value: '$(params.apiserver-replicas)' | ||
- name: apiserver-image | ||
value: '$(params.apiserver-image)' | ||
- name: apiserver-parameters | ||
value: '$(params.apiserver-parameters)' | ||
- name: apiserver-instance-type | ||
value: '$(params.apiserver-instance-type)' | ||
- name: etcd-replicas | ||
value: '$(params.etcd-replicas)' | ||
- name: etcd-image | ||
value: '$(params.etcd-image)' | ||
- name: etcd-parameters | ||
value: '$(params.etcd-parameters)' | ||
- name: etcd-instance-type | ||
value: '$(params.etcd-instance-type)' | ||
|
||
- name: retieve-kubeconfig | ||
runAfter: [setup-control-plane] | ||
taskRef: | ||
kind: Task | ||
name: kit-retrieve-kubeconfig | ||
params: | ||
- name: cluster-name | ||
value: '$(params.name)' | ||
workspaces: | ||
- name: kubeconfig | ||
workspace: kubeconfig | ||
|
||
- name: install-cni | ||
runAfter: [retieve-kubeconfig] | ||
taskRef: | ||
kind: Task | ||
name: install-cni | ||
params: | ||
- name: aws-vpc-cni-version | ||
value: 'release-1.10' | ||
workspaces: | ||
- name: kubeconfig | ||
workspace: kubeconfig | ||
|
||
- name: install-csi | ||
runAfter: [install-cni] | ||
taskRef: | ||
kind: Task | ||
name: install-csi | ||
params: | ||
- name: aws-ebs-csi-driver-version | ||
value: 'release-1.13' | ||
workspaces: | ||
- name: kubeconfig | ||
workspace: kubeconfig | ||
|
||
- name: setup-monitoring-node | ||
runAfter: [install-csi] | ||
taskRef: | ||
kind: Task | ||
name: data-plane-setup | ||
params: | ||
- name: cluster-name | ||
value: '$(params.name)' | ||
- name: dataplane-name | ||
value: 'monitoring-$(params.name)' | ||
- name: desired-nodes | ||
value: '1' | ||
- name: instance-types | ||
value: '$(params.monitoring-node-instance-types)' | ||
|
||
- name: setup-data-plane | ||
runAfter: [label-and-taint-minitoring-node] | ||
taskRef: | ||
kind: Task | ||
name: data-plane-setup | ||
params: | ||
- name: cluster-name | ||
value: '$(params.name)' | ||
- name: desired-nodes | ||
value: '$(params.node_count)' | ||
|
||
- name: validate-data-plane | ||
runAfter: [setup-data-plane] | ||
taskRef: | ||
kind: Task | ||
name: validate-data-plane | ||
params: | ||
- name: desired-nodes | ||
value: '$(($(params.node_count)+1))' | ||
workspaces: | ||
- name: kubeconfig | ||
workspace: kubeconfig | ||
|
||
- name: label-and-taint-minitoring-node | ||
runAfter: [setup-monitoring-node] | ||
taskRef: | ||
kind: Task | ||
name: label-and-taint-node | ||
params: | ||
- name: cluster-name | ||
value: '$(params.name)' | ||
- name: selectors | ||
value: '$(params.monitoring-node-selectors)' | ||
- name: taint | ||
value: 'monitoring=true:NoSchedule' | ||
# We add another label to ensure Prometheus stack only run on the dedicated node in | ||
# https://github.com/awslabs/kubernetes-iteration-toolkit/blob/e95b99e09e89f23a4aa8162632ba78b6c351dec5/tests/tasks/generators/clusterloader/load.yaml#L84 | ||
- name: labels | ||
value: 'eks.amazonaws.com/nodegroup=monitoring-$(params.name)-nodes-1' | ||
workspaces: | ||
- name: kubeconfig | ||
workspace: kubeconfig | ||
|
||
- name: load | ||
runAfter: [validate-data-plane] | ||
taskRef: | ||
kind: Task | ||
name: load | ||
params: | ||
- name: cluster-name | ||
value: '$(params.name)' | ||
- name: cl2-branch | ||
value: '$(params.cl2-branch)' | ||
- name: giturl | ||
value: '$(params.giturl)' | ||
- name: pods-per-node | ||
value: '$(params.pods-per-node)' | ||
- name: nodes-per-namespace | ||
value: '$(params.nodes-per-namespace)' | ||
- name: cl2-load-test-throughput | ||
value: '$(params.cl2-load-test-throughput)' | ||
- name: results-bucket | ||
value: '$(params.results-bucket)' | ||
- name: nodes | ||
value: '$(params.node_count)' | ||
- name: amp-workspace-id | ||
value: '$(params.amp-workspace-id)' | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
- name: results | ||
workspace: results | ||
- name: kubeconfig | ||
workspace: kubeconfig | ||
|
||
# finally: | ||
# - name: teardown | ||
# taskRef: | ||
# name: teardown | ||
# params: | ||
# - name: name | ||
# value: '$(params.name)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will be need to make changes to the EKS scale test pipeline before merging.