mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 05:01:46 +00:00
Added benchmarks for pod affinity namespaceselector
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
team: devops
|
@@ -475,3 +475,149 @@
|
||||
params:
|
||||
initNodes: 5000
|
||||
measurePods: 2000
|
||||
|
||||
- name: SchedulingRequiredPodAntiAffinityWithNSSelector
|
||||
featureGates:
|
||||
PodAffinityNamespaceSelector: true
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
countParam: $initNodes
|
||||
uniqueNodeLabelStrategy:
|
||||
labelKey: kubernetes.io/hostname
|
||||
- opcode: createNamespaces
|
||||
prefix: init-ns
|
||||
countParam: $initNamespaces
|
||||
namespaceTemplatePath: config/namespace-with-labels.yaml
|
||||
- opcode: createNamespaces
|
||||
prefix: measure-ns
|
||||
count: 1
|
||||
namespaceTemplatePath: config/namespace-with-labels.yaml
|
||||
- opcode: createPodSets
|
||||
countParam: $initNamespaces
|
||||
namespacePrefix: init-ns
|
||||
createPodsOp:
|
||||
opcode: createPods
|
||||
countParam: $initPodsPerNamespace
|
||||
podTemplatePath: config/pod-anti-affinity-ns-selector.yaml
|
||||
- opcode: createPods
|
||||
countParam: $measurePods
|
||||
podTemplatePath: config/pod-anti-affinity-ns-selector.yaml
|
||||
collectMetrics: true
|
||||
namespace: measure-ns-0
|
||||
workloads:
|
||||
- name: 5000Nodes
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPodsPerNamespace: 40
|
||||
initNamespaces: 100
|
||||
measurePods: 1000
|
||||
|
||||
- name: SchedulingPreferredAntiAffinityWithNSSelector
|
||||
featureGates:
|
||||
PodAffinityNamespaceSelector: true
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
countParam: $initNodes
|
||||
uniqueNodeLabelStrategy:
|
||||
labelKey: kubernetes.io/hostname
|
||||
- opcode: createNamespaces
|
||||
prefix: init-ns
|
||||
countParam: $initNamespaces
|
||||
namespaceTemplatePath: config/namespace-with-labels.yaml
|
||||
- opcode: createNamespaces
|
||||
prefix: measure-ns
|
||||
count: 1
|
||||
namespaceTemplatePath: config/namespace-with-labels.yaml
|
||||
- opcode: createPodSets
|
||||
countParam: $initNamespaces
|
||||
namespacePrefix: init-ns
|
||||
createPodsOp:
|
||||
opcode: createPods
|
||||
countParam: $initPodsPerNamespace
|
||||
podTemplatePath: config/pod-preferred-anti-affinity-ns-selector.yaml
|
||||
- opcode: createPods
|
||||
countParam: $measurePods
|
||||
podTemplatePath: config/pod-preferred-anti-affinity-ns-selector.yaml
|
||||
collectMetrics: true
|
||||
namespace: measure-ns-0
|
||||
workloads:
|
||||
- name: 5000Nodes
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPodsPerNamespace: 40
|
||||
initNamespaces: 100
|
||||
measurePods: 1000
|
||||
|
||||
- name: SchedulingRequiredPodAffinityWithNSSelector
|
||||
featureGates:
|
||||
PodAffinityNamespaceSelector: true
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
countParam: $initNodes
|
||||
labelNodePrepareStrategy:
|
||||
labelKey: "topology.kubernetes.io/zone"
|
||||
labelValues: ["zone1"]
|
||||
- opcode: createNamespaces
|
||||
prefix: init-ns
|
||||
countParam: $initNamespaces
|
||||
namespaceTemplatePath: config/namespace-with-labels.yaml
|
||||
- opcode: createNamespaces
|
||||
prefix: measure-ns
|
||||
count: 1
|
||||
namespaceTemplatePath: config/namespace-with-labels.yaml
|
||||
- opcode: createPodSets
|
||||
countParam: $initNamespaces
|
||||
namespacePrefix: init-ns
|
||||
createPodsOp:
|
||||
opcode: createPods
|
||||
countParam: $initPodsPerNamespace
|
||||
podTemplatePath: config/pod-affinity-ns-selector.yaml
|
||||
- opcode: createPods
|
||||
countParam: $measurePods
|
||||
podTemplatePath: config/pod-affinity-ns-selector.yaml
|
||||
collectMetrics: true
|
||||
namespace: measure-ns-0
|
||||
workloads:
|
||||
- name: 5000Nodes
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPodsPerNamespace: 50
|
||||
initNamespaces: 100
|
||||
measurePods: 1000
|
||||
|
||||
- name: SchedulingPreferredAffinityWithNSSelector
|
||||
featureGates:
|
||||
PodAffinityNamespaceSelector: true
|
||||
workloadTemplate:
|
||||
- opcode: createNodes
|
||||
countParam: $initNodes
|
||||
uniqueNodeLabelStrategy:
|
||||
labelKey: kubernetes.io/hostname
|
||||
- opcode: createNamespaces
|
||||
prefix: init-ns
|
||||
countParam: $initNamespaces
|
||||
namespaceTemplatePath: config/namespace-with-labels.yaml
|
||||
- opcode: createNamespaces
|
||||
prefix: measure-ns
|
||||
count: 1
|
||||
namespaceTemplatePath: config/namespace-with-labels.yaml
|
||||
- opcode: createPodSets
|
||||
countParam: $initNamespaces
|
||||
namespacePrefix: init-ns
|
||||
createPodsOp:
|
||||
opcode: createPods
|
||||
countParam: $initPodsPerNamespace
|
||||
podTemplatePath: config/pod-preferred-affinity-ns-selector.yaml
|
||||
- opcode: createPods
|
||||
countParam: $measurePods
|
||||
podTemplatePath: config/pod-preferred-affinity-ns-selector.yaml
|
||||
collectMetrics: true
|
||||
namespace: measure-ns-0
|
||||
workloads:
|
||||
- name: 5000Nodes
|
||||
params:
|
||||
initNodes: 5000
|
||||
initPodsPerNamespace: 50
|
||||
initNamespaces: 100
|
||||
measurePods: 1000
|
||||
|
||||
|
@@ -0,0 +1,29 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
generateName: affinity-pod-
|
||||
labels:
|
||||
color: blue
|
||||
spec:
|
||||
affinity:
|
||||
podAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
color: blue
|
||||
topologyKey: topology.kubernetes.io/zone
|
||||
namespaceSelector:
|
||||
matchLabels:
|
||||
team: devops
|
||||
containers:
|
||||
- image: k8s.gcr.io/pause:3.4.1
|
||||
name: pause
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
@@ -0,0 +1,29 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
generateName: anti-affinity-pod-
|
||||
labels:
|
||||
color: green
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
color: green
|
||||
topologyKey: kubernetes.io/hostname
|
||||
namespaceSelector:
|
||||
matchLabels:
|
||||
team: devops
|
||||
containers:
|
||||
- image: k8s.gcr.io/pause:3.4.1
|
||||
name: pause
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
@@ -0,0 +1,31 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
generateName: preferred-affinity-pod-
|
||||
labels:
|
||||
color: red
|
||||
spec:
|
||||
affinity:
|
||||
podAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
color: red
|
||||
topologyKey: kubernetes.io/hostname
|
||||
namespaceSelector:
|
||||
matchLabels:
|
||||
team: devops
|
||||
weight: 1
|
||||
containers:
|
||||
- image: k8s.gcr.io/pause:3.4.1
|
||||
name: pause
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
@@ -0,0 +1,31 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
generateName: anti-affinity-pod-
|
||||
labels:
|
||||
color: green
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
color: green
|
||||
topologyKey: kubernetes.io/hostname
|
||||
namespaceSelector:
|
||||
matchLabels:
|
||||
team: devops
|
||||
weight: 1
|
||||
containers:
|
||||
- image: k8s.gcr.io/pause:3.4.1
|
||||
name: pause
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
Reference in New Issue
Block a user