-
Notifications
You must be signed in to change notification settings - Fork 608
Support for pod, CR resource type for benchmark Listing #3432
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
{{$configMapBytes := DefaultParam .CL2_LIST_CONFIG_MAP_BYTES 100000}} | ||
{{$configMapNumber := DefaultParam .CL2_LIST_CONFIG_MAP_NUMBER 10000}} | ||
{{$configMapGroup := DefaultParam .CL2_LIST_CONFIG_MAP_GROUP "list-configmap"}} | ||
{($podsNumber := DefaultParam .CL2_LIST_PODS_NUMBER 100000)} | ||
{{$podGroup := DefaultParam .CL2_LIST_POD_GROUP "list-pods"}} | ||
|
||
{{$listReplicas := DefaultParam .CL2_LIST_BENCHMARK_PODS 1}} | ||
{{$contentType := DefaultParam .CL2_LIST_BENCHMARK_CONTENT_TYPE "json"}} | ||
|
@@ -64,17 +66,17 @@ steps: | |
uri: /api/v1/configmaps?resourceVersion=0 | ||
namespaced: false | ||
contentType: {{$contentType}} | ||
- module: | ||
- module: &startMeasurements | ||
path: /modules/measurements.yaml | ||
params: | ||
action: start | ||
- name: Wait 5 minutes | ||
measurements: | ||
measurements: &waitMeasurements | ||
- Identifier: Wait | ||
Method: Sleep | ||
Params: | ||
duration: 5m | ||
- module: | ||
- module: &gatherMeasurements | ||
path: /modules/measurements.yaml | ||
params: | ||
action: gather | ||
|
@@ -83,3 +85,34 @@ steps: | |
params: | ||
namePrefix: "list-configmaps-" | ||
replicas: 0 | ||
|
||
- name: Create pods | ||
phases: | ||
- namespaceRange: | ||
min: 1 | ||
max: 1 | ||
tuningSet: Sequence | ||
replicasPerNamespace: {{$podsNumber}} | ||
objectBundle: | ||
- basename: {{$podGroup}} | ||
objectTemplatePath: pod.yaml | ||
templateFillMap: | ||
group: {{$podGroup}} | ||
|
||
- module: | ||
path: modules/list-benchmark.yaml | ||
params: | ||
namePrefix: "list-pods-" | ||
replicas: {{$listReplicas}} | ||
uri: /api/v1/pods?resourceVersion=0 | ||
namespaced: false | ||
contentType: {{$contentType}} | ||
- module: *startMeasurements | ||
- name: Wait 5 minutes | ||
measurements: *waitMeasurements | ||
- module: *gatherMeasurements | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doing measurements this way will override file with configmap measurements. We need to put them in separate files. cc @mborsz for ideas. |
||
- module: | ||
path: modules/list-benchmark.yaml | ||
params: | ||
namePrefix: "list-pods-" | ||
replicas: 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{$group := DefaultParam .group .Name}} | ||
|
||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: {{.Name}} | ||
labels: | ||
app: {{$group}} | ||
spec: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The goal is to measure the cost of Listing objects from apiserver. Pods are a different from configmaps as they cannot be passively created without side effects. Immediately after pod creation K8s controllers will start processing them for container to run, scheduler will assign node, Kubelet will pull it and start updating status etc. We would like to avoid that. Could you propose some way to avoid those pods being processed? For example adding a node selector that prevents scheduling or find other ways to disable scheduler? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After checking how and where perfdash is deployed which led me to this link -https://github.com/kubernetes/k8s.io/blob/main/running-in-community-clusters.md Adding nodeaffinity/antiaffinity didn't seem like the right option, hence chose to put a schedulerName which is simpler. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good |
||
containers: | ||
- name: nginx-container | ||
image: nginx | ||
ports: | ||
- containerPort: 80 |
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.
Think you should delete configmaps and wait couple of minutes so that they are not counted in memory used when collecting metrics for pods.
Uh oh!
There was an error while loading. Please reload this page.
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.
I might need a little help with some reference or example within in this repo. Does the action - "delete" help? I tried looking into any existing examples, but not quite sure.
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.
@mborsz , could you please help me here?
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.
@mborsz @wojtek-t I am still looking for some help here!