├── config ├── docs ├── index.md └── media │ └── logo │ ├── openshift-logo.png │ ├── kube-burner-logo.png │ ├── kube-burner-logo-black.png │ ├── kube-burner-logo-mini.png │ └── kube-burner-logo-github.png ├── test ├── ocp │ ├── user-metadata.yml │ ├── alerts.yml │ ├── custom-metrics.yml │ ├── metrics-endpoints.yaml │ ├── pod.yaml │ └── custom-workload.yml ├── hack │ ├── kueue │ │ ├── kueue.yml │ │ └── manifests.yml │ └── deploy-kueue.sh └── .gitignore ├── .markdownlint.json ├── .codespellrc ├── hack ├── license.sh ├── tag_name.sh └── install.sh ├── cmd └── config │ ├── node-scale │ ├── namespace.yml │ ├── secret-kubeconfig.yml │ ├── rolebinding.yml │ ├── pod.yml │ └── node-scale.yml │ ├── anp-density-pods │ ├── pod-reader-sa.yml │ ├── pod-reader-cluster-role.yml │ ├── pod-reader-service.yml │ ├── perfapp-clusterip-service.yml │ ├── pod-reader-cluster-role-binding.yml │ ├── postgres-service.yml │ ├── anp-allow-openshift-dns.yml │ ├── anp-allow-openshift-ingress.yml │ ├── anp-allow-openshift-kubeapi.yml │ ├── anp-pod-selector-no-traffic-open-from-cidr.yml │ ├── anp-pod-selector-no-traffic-restricted-from-cidr.yml │ ├── anp-pod-selector-policy-rules-restricted-and-open.yml │ ├── banp-default-deny-traffic.yml │ ├── anp-node-selector-two-worker-group.yml │ ├── postgres-deployment.yml │ ├── perfapp-deployment.yml │ ├── pod-reader-pod.yml │ └── egress-traffic-app.yml │ ├── web-burner-init │ ├── permissionsServiceAccount.yml │ ├── permissionsClusterRole.yml │ ├── sriov_network.yml │ ├── permissionsClusterRoleBinding.yml │ ├── permissionsRoleBinding.yml │ ├── macvlan_network.yml │ ├── pod_served.yml │ ├── adminPolicyBasedExternalRoute.yml │ └── cm_frr.yml │ ├── kueue-operator-jobs │ ├── resource-flavor.yml │ ├── local-queue.yml │ ├── cluster-queue.yml │ ├── job.yml │ └── kueue-operator-jobs.yml │ ├── kueue-operator-pods │ ├── resource-flavor.yml │ ├── local-queue.yml │ ├── cluster-queue.yml │ ├── pod.yml │ └── kueue-operator-pods.yml │ ├── olm │ ├── sa.yml │ ├── clusterrole.yml │ ├── clustercatalog-iteration.yml │ ├── clustercatalog.yml │ ├── clusterextension.yml │ └── clusterrolebinding.yml │ ├── kueue-operator-jobs-shared │ ├── resource-flavor.yml │ ├── local-queue.yml │ ├── cluster-queue.yml │ ├── job.yml │ └── kueue-operator-jobs-shared.yml │ ├── cluster-density-ms │ ├── imagestream.yml │ ├── configmap.yml │ ├── secret.yml │ ├── route.yml │ ├── service.yml │ ├── cluster-density-ms.yml │ └── deployment.yml │ ├── cluster-density-v2 │ ├── imagestream.yml │ ├── configmap.yml │ ├── secret.yml │ ├── np-deny-all.yml │ ├── route.yml │ ├── service.yml │ ├── np-allow-from-ingress.yml │ ├── np-allow-from-clients.yml │ ├── build.yml │ ├── cluster-density-v2.yml │ └── deployment-server.yml │ ├── rds-core │ ├── configmap.yml │ ├── secret.yml │ ├── np-deny-all.yml │ ├── bgpadvertisement.yml │ ├── route.yml │ ├── bgppeer.yml │ ├── ipaddresspool.yml │ ├── np-allow-from-ingress.yml │ ├── sriov-dpdk-network.yml │ ├── service-lb.yml │ ├── sriov-network.yml │ ├── np-allow-from-clients.yml │ ├── service.yml │ ├── deployment-dpdk.yml │ └── deployment-server.yml │ ├── udn-bgp │ ├── configmap.yml │ ├── pod.yml │ ├── ra.yml │ └── cudn.yml │ ├── network-policy │ ├── np-deny-all.yml │ ├── np-allow-from-proxy.yml │ └── pod.yml │ ├── udn-density-pods │ ├── np-deny-all.yml │ ├── udn_l2.yml │ ├── service.yml │ ├── udn_l3.yml │ ├── np-allow-from-clients.yml │ ├── deployment-server.yml │ └── deployment-client.yml │ ├── virt-capacity-benchmark │ └── templates │ │ ├── resize_pvc.yml │ │ ├── secret_ssh_public.yml │ │ └── vm-snapshot.yml │ ├── virt-clone │ └── templates │ │ ├── secret_ssh_public.yml │ │ ├── baseImageDataVolumeSnapshot.yml │ │ ├── baseImageDataSource.yml │ │ ├── baseImageDataVolume.yml │ │ └── vm.yml │ ├── virt-migration │ ├── templates │ │ ├── remove_affinity_patch.yml │ │ ├── secret_ssh_public.yml │ │ └── vm.yml │ └── check.sh │ ├── virt-ephemeral-restart │ └── templates │ │ ├── secret_ssh_public.yml │ │ ├── baseImageDataVolumeSnapshot.yml │ │ ├── baseImageDataSource.yml │ │ ├── baseImageDataVolume.yml │ │ └── vm.yml │ ├── web-burner-cluster-density │ ├── cluster_density_configmap.yml │ ├── cluster_density_pod_service2.yml │ ├── cluster_density_pod_service.yml │ ├── cluster_density_dep_served_ports.yml │ ├── cluster_density_dep_served.yml │ ├── cluster_density_pod_served.yml │ ├── cluster_density_pod_service_ports.yml │ └── cluster_density_secret.yml │ ├── virt-udn-density │ ├── udn_l2.yml │ ├── service.yml │ ├── udn_l3.yml │ ├── vm-client.yml │ ├── vm-server.yml │ └── virt-udn-density.yml │ ├── virt-density │ ├── Containerfile │ ├── vm.yml │ └── virt-density.yml │ ├── egressip │ ├── prometheus_role.yml │ ├── pod_monitor.yml │ ├── prometheus_role_binding.yml │ ├── egressip-obj.yml │ ├── deployment-client.yml │ └── egressip.yml │ ├── dv-clone │ └── templates │ │ ├── baseImageDataVolumeSnapshot.yml │ │ ├── baseImageDataSource.yml │ │ ├── baseImageDataVolume.yml │ │ └── cloneImageDataVolume.yml │ ├── node-density-cni │ ├── webserver-service.yml │ ├── webserver-deployment.yml │ ├── curl-deployment.yml │ └── node-density-cni.yml │ ├── web-burner-node-density │ ├── node_density_pod_service_served.yml │ └── node_density_pod_served.yml │ ├── node-density-heavy │ ├── postgres-service.yml │ ├── postgres-deployment.yml │ ├── app-deployment.yml │ └── node-density-heavy.yml │ ├── pvc-density │ ├── pvc.yml │ ├── pod.yml │ └── pvc-density.yml │ ├── whereabouts │ ├── ipam.yml │ ├── ipam-fast.yml │ ├── pod.yml │ └── whereabouts.yml │ ├── crd-scale │ ├── example-crd.yml │ └── crd-scale.yml │ ├── metrics-profiles │ ├── metrics-report-stackrox.yml │ └── kueue-metrics.yml │ └── node-density │ ├── pod.yml │ └── node-density.yml ├── .gitignore ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── workflows │ ├── release.yml │ ├── linters.yml │ ├── stale.yml │ ├── ci-tests.yml │ ├── codeql.yml │ ├── gorelease.yml │ ├── build-matrix.yml │ ├── builders.yml │ ├── docs.yml │ └── test-ocp.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── .golangci.yml ├── CODEOWNERS ├── pkg ├── measurements │ └── routeadvertisement-latency_unspecified.go └── workloads │ ├── types.go │ ├── crd-scale.go │ ├── udn-bgp.go │ ├── whereabouts.go │ ├── pvc-density.go │ ├── web-burner.go │ └── kueue-operator.go ├── .pre-commit-config.yaml ├── .goreleaser.yml ├── dashboards └── README.md ├── Makefile └── mkdocs.yml /config: -------------------------------------------------------------------------------- 1 | cmd/config/ -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | ../README.md -------------------------------------------------------------------------------- /test/ocp/user-metadata.yml: -------------------------------------------------------------------------------- 1 | cloud-bulldozer: true 2 | -------------------------------------------------------------------------------- /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "MD013": false, 3 | "MD007": {"indent": 4} 4 | } 5 | -------------------------------------------------------------------------------- /.codespellrc: -------------------------------------------------------------------------------- 1 | [codespell] 2 | skip = go.mod,go.sum 3 | ignore-words-list = passt, NotIn -------------------------------------------------------------------------------- /hack/license.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | addlicense -l apache -c "The Kube-burner Authors." ./*.go 5 | -------------------------------------------------------------------------------- /cmd/config/node-scale/namespace.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Namespace 3 | metadata: 4 | name: kubemark 5 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/pod-reader-sa.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: pod-reader 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.exe~ 3 | *.dll 4 | *.so 5 | *.dylib 6 | *.test 7 | *.out 8 | bin 9 | dist 10 | site/ 11 | *.log 12 | -------------------------------------------------------------------------------- /docs/media/logo/openshift-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kube-burner/kube-burner-ocp/HEAD/docs/media/logo/openshift-logo.png -------------------------------------------------------------------------------- /docs/media/logo/kube-burner-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kube-burner/kube-burner-ocp/HEAD/docs/media/logo/kube-burner-logo.png -------------------------------------------------------------------------------- /cmd/config/web-burner-init/permissionsServiceAccount.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: internal-kubectl 5 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-jobs/resource-flavor.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kueue.x-k8s.io/v1beta2 2 | kind: ResourceFlavor 3 | metadata: 4 | name: default 5 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-pods/resource-flavor.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kueue.x-k8s.io/v1beta2 2 | kind: ResourceFlavor 3 | metadata: 4 | name: default 5 | -------------------------------------------------------------------------------- /docs/media/logo/kube-burner-logo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kube-burner/kube-burner-ocp/HEAD/docs/media/logo/kube-burner-logo-black.png -------------------------------------------------------------------------------- /docs/media/logo/kube-burner-logo-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kube-burner/kube-burner-ocp/HEAD/docs/media/logo/kube-burner-logo-mini.png -------------------------------------------------------------------------------- /cmd/config/olm/sa.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: "ins-sa-{{.Iteration}}" 5 | namespace: "{{.prefixNamespace}}" -------------------------------------------------------------------------------- /docs/media/logo/kube-burner-logo-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kube-burner/kube-burner-ocp/HEAD/docs/media/logo/kube-burner-logo-github.png -------------------------------------------------------------------------------- /cmd/config/kueue-operator-jobs-shared/resource-flavor.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kueue.x-k8s.io/v1beta2 2 | kind: ResourceFlavor 3 | metadata: 4 | name: default 5 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-ms/imagestream.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: ImageStream 3 | apiVersion: image.openshift.io/v1 4 | metadata: 5 | name: cluster-density-{{.Replica}} 6 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/imagestream.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: ImageStream 3 | apiVersion: image.openshift.io/v1 4 | metadata: 5 | name: cluster-density-{{.Replica}} 6 | -------------------------------------------------------------------------------- /cmd/config/rds-core/configmap.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{.JobName}}-{{.Replica}} 6 | data: 7 | key1: "{{randAlphaNum 2048}}" 8 | -------------------------------------------------------------------------------- /cmd/config/rds-core/secret.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{.JobName}}-{{.Replica}} 6 | data: 7 | top-secret: "{{randAlphaNum 2048}}" 8 | -------------------------------------------------------------------------------- /cmd/config/rds-core/np-deny-all.yml: -------------------------------------------------------------------------------- 1 | kind: NetworkPolicy 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: deny-all 5 | spec: 6 | podSelector: {} 7 | ingress: [] 8 | -------------------------------------------------------------------------------- /cmd/config/udn-bgp/configmap.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{.JobName}}-{{.Replica}} 6 | data: 7 | key1: "{{randAlphaNum 2048}}" 8 | 9 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-ms/configmap.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{.JobName}}-{{.Replica}} 6 | data: 7 | key1: "{{randAlphaNum 2048}}" 8 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-ms/secret.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{.JobName}}-{{.Replica}} 6 | data: 7 | top-secret: "{{randAlphaNum 2048}}" 8 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/configmap.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{.JobName}}-{{.Replica}} 6 | data: 7 | key1: "{{randAlphaNum 2048}}" 8 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/secret.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{.JobName}}-{{.Replica}} 6 | data: 7 | top-secret: "{{randAlphaNum 2048}}" 8 | -------------------------------------------------------------------------------- /cmd/config/network-policy/np-deny-all.yml: -------------------------------------------------------------------------------- 1 | kind: NetworkPolicy 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: deny-all 5 | spec: 6 | podSelector: {} 7 | ingress: [] 8 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/np-deny-all.yml: -------------------------------------------------------------------------------- 1 | kind: NetworkPolicy 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: deny-all 5 | spec: 6 | podSelector: {} 7 | ingress: [] 8 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-jobs/local-queue.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kueue.x-k8s.io/v1beta2 2 | kind: LocalQueue 3 | metadata: 4 | name: kueue-scale 5 | spec: 6 | clusterQueue: cluster-queue 7 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-pods/local-queue.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kueue.x-k8s.io/v1beta2 2 | kind: LocalQueue 3 | metadata: 4 | name: kueue-scale 5 | spec: 6 | clusterQueue: cluster-queue 7 | -------------------------------------------------------------------------------- /cmd/config/udn-density-pods/np-deny-all.yml: -------------------------------------------------------------------------------- 1 | kind: NetworkPolicy 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: deny-all 5 | spec: 6 | podSelector: {} 7 | ingress: [] 8 | -------------------------------------------------------------------------------- /cmd/config/virt-capacity-benchmark/templates/resize_pvc.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | spec: 4 | resources: 5 | requests: 6 | storage: {{ .storageSize }} 7 | -------------------------------------------------------------------------------- /cmd/config/virt-clone/templates/secret_ssh_public.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: {{ .name }} 5 | type: Opaque 6 | data: 7 | key: {{ .publicKeyPath | ReadFile | b64enc }} -------------------------------------------------------------------------------- /cmd/config/virt-migration/templates/remove_affinity_patch.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kubevirt.io/v1 2 | kind: VirtualMachine 3 | spec: 4 | template: 5 | spec: 6 | affinity: 7 | nodeAffinity: null 8 | -------------------------------------------------------------------------------- /cmd/config/virt-migration/templates/secret_ssh_public.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: "{{ .name }}" 5 | type: Opaque 6 | data: 7 | key: {{ .publicKeyPath | ReadFile | b64enc }} -------------------------------------------------------------------------------- /hack/tag_name.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ -z $(git branch --show-current) ]]; then 4 | git describe --tags --abbrev=0 5 | else 6 | git branch --show-current | sed 's/master/latest/g' 7 | fi 8 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-jobs-shared/local-queue.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kueue.x-k8s.io/v1beta2 2 | kind: LocalQueue 3 | metadata: 4 | name: kueue-scale 5 | spec: 6 | clusterQueue: cluster-queue-{{.Iteration}} 7 | -------------------------------------------------------------------------------- /cmd/config/virt-ephemeral-restart/templates/secret_ssh_public.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: {{ .name }} 5 | type: Opaque 6 | data: 7 | key: {{ .publicKeyPath | ReadFile | b64enc }} -------------------------------------------------------------------------------- /cmd/config/web-burner-cluster-density/cluster_density_configmap.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: configmap-{{ .Replica }} 6 | data: 7 | key1: "3" 8 | key2: "value" 9 | -------------------------------------------------------------------------------- /cmd/config/node-scale/secret-kubeconfig.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: kubeconfig 5 | namespace: kubemark 6 | type: Opaque 7 | data: 8 | kubeconfig: {{ env "KUBECONFIG" | ReadFile | b64enc }} 9 | -------------------------------------------------------------------------------- /cmd/config/virt-capacity-benchmark/templates/secret_ssh_public.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: "{{ .name }}-{{ .counter }}" 5 | type: Opaque 6 | data: 7 | key: {{ .publicKeyPath | ReadFile | b64enc }} -------------------------------------------------------------------------------- /cmd/config/rds-core/bgpadvertisement.yml: -------------------------------------------------------------------------------- 1 | apiVersion: metallb.io/v1beta1 2 | kind: BGPAdvertisement 3 | metadata: 4 | name: bgpadvertisement-basic 5 | namespace: metallb-system 6 | spec: 7 | ipAddressPools: 8 | - address-pool 9 | -------------------------------------------------------------------------------- /cmd/config/rds-core/route.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Route 3 | apiVersion: route.openshift.io/v1 4 | metadata: 5 | name: rds-{{.Replica}} 6 | spec: 7 | to: 8 | kind: Service 9 | name: rds-{{.Replica}} 10 | tls: 11 | termination: edge 12 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/pod-reader-cluster-role.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: cluster-pod-reader 5 | rules: 6 | - apiGroups: [""] 7 | resources: ["pods"] 8 | verbs: ["get", "list", "watch"] 9 | -------------------------------------------------------------------------------- /cmd/config/rds-core/bgppeer.yml: -------------------------------------------------------------------------------- 1 | apiVersion: metallb.io/v1beta2 2 | kind: BGPPeer 3 | metadata: 4 | namespace: metallb-system 5 | name: bpg-peer 6 | spec: 7 | peerAddress: 10.0.0.1 8 | peerASN: 64501 9 | myASN: 64500 10 | routerID: 10.10.10.10 11 | -------------------------------------------------------------------------------- /cmd/config/rds-core/ipaddresspool.yml: -------------------------------------------------------------------------------- 1 | apiVersion: metallb.io/v1beta1 2 | kind: IPAddressPool 3 | metadata: 4 | namespace: metallb-system 5 | name: address-pool 6 | spec: 7 | addresses: 8 | - 203.0.113.200/20 9 | - fc00:f853:ccd:e799::/120 10 | -------------------------------------------------------------------------------- /cmd/config/virt-udn-density/udn_l2.yml: -------------------------------------------------------------------------------- 1 | apiVersion: k8s.ovn.org/v1 2 | kind: UserDefinedNetwork 3 | metadata: 4 | name: l2-network-{{.Iteration}} 5 | spec: 6 | topology: Layer2 7 | layer2: 8 | role: Primary 9 | subnets: ["10.132.0.0/24"] 10 | -------------------------------------------------------------------------------- /cmd/config/web-burner-init/permissionsClusterRole.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: get-routes 5 | rules: 6 | - apiGroups: [""] 7 | resources: ["nodes"] 8 | verbs: 9 | - list 10 | - get 11 | -------------------------------------------------------------------------------- /cmd/config/udn-density-pods/udn_l2.yml: -------------------------------------------------------------------------------- 1 | 2 | apiVersion: k8s.ovn.org/v1 3 | kind: UserDefinedNetwork 4 | metadata: 5 | name: l2-network-{{.Iteration}} 6 | spec: 7 | topology: Layer2 8 | layer2: 9 | role: Primary 10 | subnets: ["10.132.0.0/16"] 11 | -------------------------------------------------------------------------------- /cmd/config/olm/clusterrole.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: "ins-admin-clusterrole-{{.Iteration}}" 5 | rules: 6 | - apiGroups: 7 | - "*" 8 | resources: 9 | - "*" 10 | verbs: 11 | - "*" 12 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-ms/route.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Route 3 | apiVersion: route.openshift.io/v1 4 | metadata: 5 | name: cluster-density-{{.Replica}} 6 | spec: 7 | to: 8 | kind: Service 9 | name: cluster-density-{{.Replica}} 10 | tls: 11 | termination: edge 12 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/route.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Route 3 | apiVersion: route.openshift.io/v1 4 | metadata: 5 | name: cluster-density-{{.Replica}} 6 | spec: 7 | to: 8 | kind: Service 9 | name: cluster-density-{{.Replica}} 10 | tls: 11 | termination: edge 12 | -------------------------------------------------------------------------------- /cmd/config/olm/clustercatalog-iteration.yml: -------------------------------------------------------------------------------- 1 | apiVersion: olm.operatorframework.io/v1 2 | kind: ClusterCatalog 3 | metadata: 4 | name: "clustercatalog-{{.Iteration}}" 5 | spec: 6 | source: 7 | type: Image 8 | image: 9 | ref: "{{.prefixImageName}}{{.Iteration}}" 10 | -------------------------------------------------------------------------------- /cmd/config/virt-density/Containerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi:latest AS builder 2 | ADD --chown=107:107 https://download.cirros-cloud.net/0.6.3/cirros-0.6.3-x86_64-disk.img /disk/ 3 | RUN chmod 0440 /disk/* 4 | 5 | FROM scratch 6 | COPY --from=builder /disk/* /disk/ 7 | -------------------------------------------------------------------------------- /cmd/config/egressip/prometheus_role.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: Role 3 | metadata: 4 | name: prometheus-k8s 5 | rules: 6 | - apiGroups: 7 | - "" 8 | resources: 9 | - pods 10 | verbs: 11 | - get 12 | - list 13 | - watch 14 | -------------------------------------------------------------------------------- /cmd/config/virt-udn-density/service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: udn-density-svc 6 | spec: 7 | selector: 8 | app: nginx 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 80 13 | targetPort: 80 14 | type: ClusterIP 15 | -------------------------------------------------------------------------------- /test/ocp/alerts.yml: -------------------------------------------------------------------------------- 1 | - expr: count(prometheus_build_info) > 0 2 | severity: warning 3 | description: Prometheus CI availability 4 | 5 | - expr: avg_over_time(prometheus_tsdb_wal_page_flushes_total[{{ .elapsed }}:]) > 0 6 | severity: warning 7 | description: Prometheus CI tsdb WAL flushes 8 | -------------------------------------------------------------------------------- /cmd/config/udn-density-pods/service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: udn-density-{{.Replica}} 6 | spec: 7 | selector: 8 | app: nginx 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 80 13 | targetPort: 8080 14 | type: ClusterIP 15 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: cluster-density-{{.Replica}} 6 | spec: 7 | selector: 8 | app: nginx 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 80 13 | targetPort: 8080 14 | type: ClusterIP 15 | -------------------------------------------------------------------------------- /cmd/config/egressip/pod_monitor.yml: -------------------------------------------------------------------------------- 1 | apiVersion: monitoring.coreos.com/v1 2 | kind: PodMonitor 3 | metadata: 4 | name: pod-monitor-{{.Replica}} 5 | spec: 6 | selector: 7 | matchLabels: 8 | app: client 9 | podMetricsEndpoints: 10 | - port: metrics 11 | interval: 15s 12 | scheme: http 13 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/pod-reader-service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: pod-reader-service 5 | spec: 6 | selector: 7 | app: pod-reader 8 | ports: 9 | - protocol: TCP 10 | port: 8080 11 | targetPort: 8080 12 | type: ClusterIP 13 | sessionAffinity: None 14 | -------------------------------------------------------------------------------- /cmd/config/virt-udn-density/udn_l3.yml: -------------------------------------------------------------------------------- 1 | apiVersion: k8s.ovn.org/v1 2 | kind: UserDefinedNetwork 3 | metadata: 4 | name: l3-network-{{.Iteration}} 5 | spec: 6 | topology: Layer3 7 | layer3: 8 | role: Primary 9 | subnets: 10 | - cidr: 10.132.0.0/16 11 | hostSubnet: 24 12 | mtu: 1300 13 | -------------------------------------------------------------------------------- /cmd/config/web-burner-cluster-density/cluster_density_pod_service2.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: service-{{ .Replica }} 5 | spec: 6 | ports: 7 | - name: http 8 | port: 8080 9 | protocol: TCP 10 | targetPort: 8080 11 | selector: 12 | ns: served-ns-{{ .Replica }} 13 | -------------------------------------------------------------------------------- /cmd/config/dv-clone/templates/baseImageDataVolumeSnapshot.yml: -------------------------------------------------------------------------------- 1 | apiVersion: snapshot.storage.k8s.io/v1 2 | kind: VolumeSnapshot 3 | metadata: 4 | name: {{ .baseVolumeSnapshotName }} 5 | spec: 6 | volumeSnapshotClassName: {{ .volumeSnapshotClassName }} 7 | source: 8 | persistentVolumeClaimName: {{ .baseVolumeSnapshotPVCName }} 9 | -------------------------------------------------------------------------------- /cmd/config/node-density-cni/webserver-service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: webserver-{{.Replica}}-{{.Iteration}} 5 | spec: 6 | selector: 7 | name: webserver-{{.Replica}}-{{.Iteration}} 8 | ports: 9 | - protocol: TCP 10 | port: 8080 11 | targetPort: 8080 12 | type: ClusterIP 13 | -------------------------------------------------------------------------------- /cmd/config/udn-density-pods/udn_l3.yml: -------------------------------------------------------------------------------- 1 | 2 | apiVersion: k8s.ovn.org/v1 3 | kind: UserDefinedNetwork 4 | metadata: 5 | name: l3-network-{{.Iteration}} 6 | spec: 7 | topology: Layer3 8 | layer3: 9 | role: Primary 10 | subnets: 11 | - cidr: 10.132.0.0/16 12 | hostSubnet: 24 13 | mtu: 1300 14 | -------------------------------------------------------------------------------- /cmd/config/virt-clone/templates/baseImageDataVolumeSnapshot.yml: -------------------------------------------------------------------------------- 1 | apiVersion: snapshot.storage.k8s.io/v1 2 | kind: VolumeSnapshot 3 | metadata: 4 | name: {{ .cloneVolumeSnapshotName }} 5 | spec: 6 | volumeSnapshotClassName: {{ .volumeSnapshotClassName }} 7 | source: 8 | persistentVolumeClaimName: {{ .cloneVolumeSnapshotPVCName }} 9 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/perfapp-clusterip-service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: perfapp-clusterip-service 5 | spec: 6 | selector: 7 | trafficapp: perfapp 8 | ports: 9 | - protocol: TCP 10 | port: 8080 11 | targetPort: 8080 12 | type: ClusterIP 13 | sessionAffinity: None 14 | -------------------------------------------------------------------------------- /cmd/config/virt-ephemeral-restart/templates/baseImageDataVolumeSnapshot.yml: -------------------------------------------------------------------------------- 1 | apiVersion: snapshot.storage.k8s.io/v1 2 | kind: VolumeSnapshot 3 | metadata: 4 | name: {{ .baseVolumeSnapshotName }} 5 | spec: 6 | volumeSnapshotClassName: {{ .volumeSnapshotClassName }} 7 | source: 8 | persistentVolumeClaimName: {{ .baseVolumeSnapshotPVCName }} 9 | -------------------------------------------------------------------------------- /cmd/config/web-burner-node-density/node_density_pod_service_served.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: service-{{ .Iteration }}-{{ .Replica }} 5 | spec: 6 | ports: 7 | - name: http 8 | port: 8080 9 | protocol: TCP 10 | targetPort: 8080 11 | selector: 12 | app: pod-served-{{ .Iteration }} 13 | -------------------------------------------------------------------------------- /cmd/config/olm/clustercatalog.yml: -------------------------------------------------------------------------------- 1 | apiVersion: olm.operatorframework.io/v1 2 | kind: ClusterCatalog 3 | metadata: 4 | name: {{.NAME_PREFIX}}-{{.Iteration}} 5 | spec: 6 | availabilityMode: Available 7 | priority: -100 8 | source: 9 | image: 10 | pollIntervalMinutes: 10 11 | ref: {{.catalogImage}} 12 | type: Image 13 | -------------------------------------------------------------------------------- /cmd/config/node-density-heavy/postgres-service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: postgres-{{.Iteration}} 6 | spec: 7 | selector: 8 | name: postgres-{{.Replica}}-{{.Iteration}} 9 | ports: 10 | - protocol: TCP 11 | port: 5432 12 | targetPort: 5432 13 | type: ClusterIP 14 | sessionAffinity: None -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Type of change 2 | 3 | 4 | 5 | - Refactor 6 | - New feature 7 | - Bug fix 8 | - Optimization 9 | - Documentation 10 | - CI 11 | 12 | ## Description 13 | 14 | 15 | 16 | ## Related Tickets & Documents 17 | 18 | - Related Issue # 19 | - Closes # 20 | 21 | -------------------------------------------------------------------------------- /cmd/config/egressip/prometheus_role_binding.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: prometheus-k8s 5 | roleRef: 6 | apiGroup: rbac.authorization.k8s.io 7 | kind: Role 8 | name: prometheus-k8s 9 | subjects: 10 | - kind: ServiceAccount 11 | name: prometheus-k8s 12 | namespace: openshift-monitoring 13 | -------------------------------------------------------------------------------- /cmd/config/network-policy/np-allow-from-proxy.yml: -------------------------------------------------------------------------------- 1 | kind: NetworkPolicy 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: allow-from-proxy 5 | spec: 6 | ingress: 7 | - from: 8 | - namespaceSelector: 9 | matchLabels: 10 | kubernetes.io/metadata.name: network-policy-proxy 11 | ports: 12 | - protocol: TCP 13 | port: 9001 14 | -------------------------------------------------------------------------------- /cmd/config/rds-core/np-allow-from-ingress.yml: -------------------------------------------------------------------------------- 1 | kind: NetworkPolicy 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: allow-from-openshift-ingress 5 | spec: 6 | ingress: 7 | - from: 8 | - namespaceSelector: 9 | matchLabels: 10 | network.openshift.io/policy-group: ingress 11 | ports: 12 | - protocol: TCP 13 | port: 8080 14 | -------------------------------------------------------------------------------- /cmd/config/olm/clusterextension.yml: -------------------------------------------------------------------------------- 1 | apiVersion: olm.operatorframework.io/v1 2 | kind: ClusterExtension 3 | metadata: 4 | name: "ce-{{.Iteration}}" 5 | spec: 6 | namespace: "{{.prefixNamespace}}" 7 | serviceAccount: 8 | name: "ins-sa-{{.Iteration}}" 9 | source: 10 | sourceType: Catalog 11 | catalog: 12 | packageName: "{{.prefixPkgName}}{{.Iteration}}" 13 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/np-allow-from-ingress.yml: -------------------------------------------------------------------------------- 1 | kind: NetworkPolicy 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: allow-from-openshift-ingress 5 | spec: 6 | ingress: 7 | - from: 8 | - namespaceSelector: 9 | matchLabels: 10 | network.openshift.io/policy-group: ingress 11 | ports: 12 | - protocol: TCP 13 | port: 8080 14 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-jobs/cluster-queue.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kueue.x-k8s.io/v1beta2 2 | kind: ClusterQueue 3 | metadata: 4 | name: "cluster-queue" 5 | spec: 6 | namespaceSelector: {} # match all. 7 | resourceGroups: 8 | - coveredResources: [pods] 9 | flavors: 10 | - name: "default" 11 | resources: 12 | - name: "pods" 13 | nominalQuota: {{.PODS_QUOTA}} 14 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-pods/cluster-queue.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kueue.x-k8s.io/v1beta2 2 | kind: ClusterQueue 3 | metadata: 4 | name: "cluster-queue" 5 | spec: 6 | namespaceSelector: {} # match all. 7 | resourceGroups: 8 | - coveredResources: [pods] 9 | flavors: 10 | - name: "default" 11 | resources: 12 | - name: "pods" 13 | nominalQuota: {{.PODS_QUOTA}} 14 | -------------------------------------------------------------------------------- /cmd/config/node-scale/rolebinding.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: privileged-to-default 5 | namespace: kubemark 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: ClusterRole 9 | name: system:openshift:scc:privileged 10 | subjects: 11 | - kind: ServiceAccount 12 | name: default 13 | namespace: kubemark 14 | -------------------------------------------------------------------------------- /cmd/config/pvc-density/pvc.yml: -------------------------------------------------------------------------------- 1 | kind: PersistentVolumeClaim 2 | apiVersion: v1 3 | metadata: 4 | labels: 5 | app: pvc-density-{{.Iteration}} 6 | name: pvc-{{.Iteration}} 7 | spec: 8 | {{ if .storageClassName }} 9 | storageClassName: {{ .storageClassName }} 10 | {{ end }} 11 | accessModes: 12 | - ReadWriteOnce 13 | resources: 14 | requests: 15 | storage: {{.claimSize}} -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/pod-reader-cluster-role-binding.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | name: cluster-pod-reader-binding 5 | subjects: 6 | - kind: ServiceAccount 7 | name: pod-reader 8 | namespace: anp-pod-reader 9 | roleRef: 10 | kind: ClusterRole 11 | name: cluster-pod-reader 12 | apiGroup: rbac.authorization.k8s.io 13 | -------------------------------------------------------------------------------- /test/hack/kueue/kueue.yml: -------------------------------------------------------------------------------- 1 | kind: Kueue 2 | apiVersion: kueue.openshift.io/v1 3 | metadata: 4 | labels: 5 | app.kubernetes.io/managed-by: kustomize 6 | app.kubernetes.io/name: kueue-operator 7 | name: cluster 8 | namespace: openshift-kueue-operator 9 | spec: 10 | config: 11 | integrations: 12 | frameworks: 13 | - BatchJob 14 | - Pod 15 | managementState: Managed 16 | -------------------------------------------------------------------------------- /cmd/config/web-burner-cluster-density/cluster_density_pod_service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: served-ns-{{ .ns }}-{{ .Replica }} 6 | labels: 7 | app: app-served-{{ .ns }} 8 | spec: 9 | ports: 10 | - name: served-ns-{{ .ns }}-{{ .Replica }} 11 | port: 8080 12 | protocol: TCP 13 | targetPort: 8080 14 | selector: 15 | app: app-served-{{ .ns }} 16 | -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | timeout: 5m 3 | linters-settings: 4 | misspell: 5 | locale: US 6 | linters: 7 | disable-all: true 8 | enable: 9 | - nakedret 10 | - unused 11 | - misspell 12 | - ineffassign 13 | - goconst 14 | - goimports 15 | - dupl 16 | - unparam 17 | - staticcheck 18 | - gosimple 19 | - unconvert 20 | - gocyclo 21 | - gofmt 22 | - govet 23 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/postgres-service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: postgres-{{.Iteration}}-{{.Replica}} 6 | spec: 7 | selector: 8 | name: postgres-{{.Iteration}}-{{.Replica}} 9 | type: perfdb-{{.Iteration}}-{{.Replica}} 10 | ports: 11 | - protocol: TCP 12 | port: 5432 13 | targetPort: 5432 14 | type: ClusterIP 15 | sessionAffinity: None 16 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-ms/service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: cluster-density-{{.Replica}} 6 | spec: 7 | selector: 8 | name: cluster-density-{{.Replica}} 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 80 13 | targetPort: 8080 14 | - name: https 15 | protocol: TCP 16 | port: 443 17 | targetPort: 8443 18 | type: ClusterIP 19 | -------------------------------------------------------------------------------- /cmd/config/web-burner-init/sriov_network.yml: -------------------------------------------------------------------------------- 1 | apiVersion: sriovnetwork.openshift.io/v1 2 | kind: SriovNetwork 3 | metadata: 4 | name: sriov-net-{{ .Iteration }} 5 | namespace: openshift-sriov-network-operator 6 | spec: 7 | ipam: | 8 | { 9 | "type": "static" 10 | } 11 | spoofChk: "off" 12 | trust: "on" 13 | resourceName: intelnics2 14 | networkNamespace: serving-ns-{{ .Iteration }} 15 | 16 | -------------------------------------------------------------------------------- /cmd/config/web-burner-init/permissionsClusterRoleBinding.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | name: get-routes-to-sa-{{ .Iteration }} 5 | subjects: 6 | - kind: ServiceAccount 7 | name: internal-kubectl 8 | namespace: serving-ns-{{ .Iteration }} 9 | roleRef: 10 | kind: ClusterRole 11 | name: get-routes 12 | apiGroup: rbac.authorization.k8s.io 13 | 14 | -------------------------------------------------------------------------------- /test/ocp/custom-metrics.yml: -------------------------------------------------------------------------------- 1 | - query: process_resident_memory_bytes{job="prometheus-k8s"} 2 | metricName: prometheusRSS 3 | 4 | - query: irate(process_cpu_seconds_total{job="prometheus-k8s"}[2m]) and on (job) topk(2,avg_over_time(process_cpu_seconds_total{job="prometheus-k8s"}[{{.elapsed}}:])) 5 | metricName: top2PrometheusCPU 6 | 7 | - query: prometheus_build_info 8 | metricName: prometheusBuildInfo 9 | instant: true 10 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release Workflow 2 | on: 3 | push: 4 | tags: 5 | - "*" # triggers only if push new tag version 6 | jobs: 7 | ci-tests: 8 | uses: ./.github/workflows/ci-tests.yml 9 | secrets: inherit 10 | 11 | release-build: 12 | uses: ./.github/workflows/gorelease.yml 13 | needs: ci-tests 14 | 15 | deploy-docs: 16 | uses: ./.github/workflows/docs.yml 17 | needs: ci-tests 18 | -------------------------------------------------------------------------------- /cmd/config/olm/clusterrolebinding.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | name: "ins-admin-clusterrole-binding-{{.Iteration}}" 5 | roleRef: 6 | apiGroup: rbac.authorization.k8s.io 7 | kind: ClusterRole 8 | name: "ins-admin-clusterrole-{{.Iteration}}" 9 | subjects: 10 | - kind: ServiceAccount 11 | name: "ins-sa-{{.Iteration}}" 12 | namespace: "{{.prefixNamespace}}" 13 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-jobs-shared/cluster-queue.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kueue.x-k8s.io/v1beta2 2 | kind: ClusterQueue 3 | metadata: 4 | name: cluster-queue-{{ sub .Replica 1 }} 5 | spec: 6 | namespaceSelector: {} # match all. 7 | cohortName: "shared-cq" 8 | resourceGroups: 9 | - coveredResources: [pods] 10 | flavors: 11 | - name: "default" 12 | resources: 13 | - name: "pods" 14 | nominalQuota: {{ .PODS_QUOTA }} -------------------------------------------------------------------------------- /test/hack/deploy-kueue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | oc apply -f kueue/manifests.yml 4 | echo "Waiting 10s for kueue CRD to be created" 5 | sleep 10s 6 | oc apply -f kueue/kueue.yml 7 | echo "Waiting for Kueue Controller Manager..." 8 | timeout --foreground 300s bash -c 'until oc rollout status deployment kueue-controller-manager -n openshift-kueue-operator; do sleep 10; echo "Still waiting..."; done' 9 | echo "Kueue Controller Manager is ready" 10 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/anp-allow-openshift-dns.yml: -------------------------------------------------------------------------------- 1 | apiVersion: policy.networking.k8s.io/v1alpha1 2 | kind: AdminNetworkPolicy 3 | metadata: 4 | name: anp-allow-openshift-dns 5 | spec: 6 | priority: 2 7 | subject: 8 | namespaces: {} 9 | egress: 10 | - name: "allow-egress-to-dns" 11 | action: "Allow" 12 | to: 13 | - namespaces: 14 | matchLabels: 15 | kubernetes.io/metadata.name: openshift-dns 16 | 17 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/anp-allow-openshift-ingress.yml: -------------------------------------------------------------------------------- 1 | apiVersion: policy.networking.k8s.io/v1alpha1 2 | kind: AdminNetworkPolicy 3 | metadata: 4 | name: anp-allow-openshift-ingress 5 | spec: 6 | priority: 3 7 | subject: 8 | namespaces: {} 9 | ingress: 10 | - name: "allow-ingress-from-ingress" 11 | action: "Allow" 12 | from: 13 | - namespaces: 14 | matchLabels: 15 | kubernetes.io/metadata.name: openshift-ingress 16 | -------------------------------------------------------------------------------- /cmd/config/dv-clone/templates/baseImageDataSource.yml: -------------------------------------------------------------------------------- 1 | apiVersion: cdi.kubevirt.io/v1beta1 2 | kind: DataSource 3 | metadata: 4 | name: {{ .baseDataSourceName }} 5 | spec: 6 | source: 7 | {{ if .useSnapshot }} 8 | snapshot: 9 | name: {{ .baseDataSourceSnapshotName }} 10 | namespace: {{ .namespace }} 11 | {{ else }} 12 | pvc: 13 | name: {{ .baseDataSourcePVCName }} 14 | namespace: {{ .namespace }} 15 | {{ end }} 16 | -------------------------------------------------------------------------------- /cmd/config/web-burner-init/permissionsRoleBinding.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: system:openshift:scc:privileged 5 | namespace: serving-ns-{{ .Iteration }} 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: ClusterRole 9 | name: system:openshift:scc:privileged 10 | subjects: 11 | - kind: ServiceAccount 12 | name: internal-kubectl 13 | namespace: serving-ns-{{ .Iteration }} 14 | -------------------------------------------------------------------------------- /cmd/config/egressip/egressip-obj.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: k8s.ovn.org/v1 3 | kind: EgressIP 4 | metadata: 5 | name: egressip-obj-{{.Iteration}} 6 | spec: 7 | egressIPs: 8 | {{range (splitList " " (GetIPAddress .eipAddresses .Iteration .addrPerIteration))}} 9 | - {{.}} 10 | {{end}} 11 | namespaceSelector: 12 | matchLabels: 13 | kubernetes.io/metadata.name: egressip-{{.Iteration}} 14 | podSelector: 15 | matchLabels: 16 | app: client 17 | -------------------------------------------------------------------------------- /cmd/config/udn-bgp/pod.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: test-pod-{{.Replica}} 5 | spec: 6 | containers: 7 | - name: webserver 8 | image: quay.io/cloud-bulldozer/sampleapp:latest 9 | resources: 10 | requests: 11 | memory: "10Mi" 12 | cpu: "10m" 13 | imagePullPolicy: IfNotPresent 14 | ports: 15 | - containerPort: 8080 16 | protocol: TCP 17 | securityContext: 18 | privileged: false 19 | -------------------------------------------------------------------------------- /cmd/config/udn-bgp/ra.yml: -------------------------------------------------------------------------------- 1 | apiVersion: k8s.ovn.org/v1 2 | kind: RouteAdvertisements 3 | metadata: 4 | name: ra-{{.Iteration}} 5 | spec: 6 | nodeSelector: {} 7 | frrConfigurationSelector: {} 8 | networkSelectors: 9 | - networkSelectionType: ClusterUserDefinedNetworks 10 | clusterUserDefinedNetworkSelector: 11 | networkSelector: 12 | matchLabels: 13 | cudn-{{.Iteration}}: "" 14 | advertisements: 15 | - "PodNetwork" 16 | - "EgressIP" 17 | -------------------------------------------------------------------------------- /cmd/config/virt-capacity-benchmark/templates/vm-snapshot.yml: -------------------------------------------------------------------------------- 1 | apiVersion: snapshot.kubevirt.io/v1beta1 2 | kind: VirtualMachineSnapshot 3 | metadata: 4 | name: "{{ .name }}-{{ .counter }}-{{ .Replica }}" 5 | labels: 6 | {{range $key, $value := .snapshotLabels }} 7 | {{ $key }}: {{ $value }} 8 | {{end}} 9 | spec: 10 | deletionPolicy: delete 11 | source: 12 | apiGroup: kubevirt.io 13 | kind: VirtualMachine 14 | name: "{{ .name }}-{{ .counter }}-{{ .Replica }}" 15 | -------------------------------------------------------------------------------- /cmd/config/virt-clone/templates/baseImageDataSource.yml: -------------------------------------------------------------------------------- 1 | apiVersion: cdi.kubevirt.io/v1beta1 2 | kind: DataSource 3 | metadata: 4 | name: {{ .cloneDataSourceName }} 5 | spec: 6 | source: 7 | {{ if .useSnapshot }} 8 | snapshot: 9 | name: {{ .cloneDataSourceSnapshotName }} 10 | namespace: {{ .cloneDataSourceSnapshotNamespace }} 11 | {{ else }} 12 | pvc: 13 | name: {{ .cloneDataSourcePVCName }} 14 | namespace: {{ .cloneDataSourcePVCNamespace }} 15 | {{ end }} 16 | -------------------------------------------------------------------------------- /cmd/config/virt-ephemeral-restart/templates/baseImageDataSource.yml: -------------------------------------------------------------------------------- 1 | apiVersion: cdi.kubevirt.io/v1beta1 2 | kind: DataSource 3 | metadata: 4 | name: {{ .baseDataSourceName }} 5 | spec: 6 | source: 7 | {{ if .useSnapshot }} 8 | snapshot: 9 | name: {{ .baseDataSourceSnapshotName }} 10 | namespace: {{ .baseDataSourceSnapshotNamespace }} 11 | {{ else }} 12 | pvc: 13 | name: {{ .baseDataSourcePVCName }} 14 | namespace: {{ .baseDataSourcePVCNamespace }} 15 | {{ end }} 16 | -------------------------------------------------------------------------------- /cmd/config/whereabouts/ipam.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: k8s.cni.cncf.io/v1 3 | kind: NetworkAttachmentDefinition 4 | metadata: 5 | name: bridge-whereabouts-10-1-0-0 6 | spec: 7 | config: |- 8 | { 9 | "cniVersion": "0.3.1", 10 | "name": "bridge-whereabouts-10-1-0-0", 11 | "type": "bridge", 12 | "bridge": "cni0", 13 | "ipam": { 14 | "type": "whereabouts", 15 | "range": "10.1.0.0/16" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /cmd/config/dv-clone/templates/baseImageDataVolume.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: cdi.kubevirt.io/v1beta1 3 | kind: DataVolume 4 | metadata: 5 | name: {{ .baseDataVolumeName }} 6 | annotations: 7 | cdi.kubevirt.io/storage.bind.immediate.requested: "true" 8 | spec: 9 | source: 10 | registry: 11 | url: {{ .imageUrl }} 12 | storage: 13 | accessModes: 14 | - {{ .accessMode }} 15 | resources: 16 | requests: 17 | storage: {{ .baseDataVolumeSize }} 18 | storageClassName: {{ .storageClassName }} 19 | ... -------------------------------------------------------------------------------- /test/ocp/metrics-endpoints.yaml: -------------------------------------------------------------------------------- 1 | - endpoint: http://localhost:9090 2 | metrics: 3 | - custom-metrics.yml 4 | alerts: 5 | - alerts.yml 6 | indexer: 7 | esServers: ["{{.ES_SERVER}}"] 8 | insecureSkipVerify: true 9 | defaultIndex: {{.ES_INDEX}} 10 | type: opensearch 11 | - endpoint: http://localhost:9090 12 | metrics: 13 | - custom-metrics.yml 14 | indexer: 15 | esServers: ["{{.ES_SERVER}}"] 16 | insecureSkipVerify: true 17 | defaultIndex: {{.ES_INDEX}} 18 | type: opensearch 19 | -------------------------------------------------------------------------------- /cmd/config/virt-ephemeral-restart/templates/baseImageDataVolume.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: cdi.kubevirt.io/v1beta1 3 | kind: DataVolume 4 | metadata: 5 | name: {{ .baseDataVolumeName }} 6 | annotations: 7 | cdi.kubevirt.io/storage.bind.immediate.requested: "true" 8 | spec: 9 | source: 10 | registry: 11 | url: {{ .baseDataVolumeUrl }} 12 | storage: 13 | accessModes: 14 | - {{ .accessMode }} 15 | resources: 16 | requests: 17 | storage: {{ .baseDataVolumeSize }} 18 | storageClassName: {{ .storageClassName }} 19 | ... -------------------------------------------------------------------------------- /cmd/config/rds-core/sriov-dpdk-network.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: sriovnetwork.openshift.io/v1 3 | kind: SriovNetwork 4 | metadata: 5 | name: sriov-dpdk-net-{{ .Iteration }}-{{ .Replica }} 6 | namespace: openshift-sriov-network-operator 7 | spec: 8 | ipam: | 9 | { 10 | "type": "static", 11 | "addresses": [ 12 | { 13 | "address": "10.1.54.0/24" 14 | } 15 | ] 16 | } 17 | logLevel: info #debug 18 | spoofChk: "off" 19 | trust: "on" 20 | resourceName: {{ .sriovDpdkDevicepool }} 21 | networkNamespace: rds-{{ .Iteration }} 22 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-jobs/job.yml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: {{.JobName}}-{{.Replica}} 5 | labels: 6 | group: test-job 7 | kueue.x-k8s.io/queue-name: kueue-scale 8 | spec: 9 | parallelism: {{.parallelism}} 10 | completions: {{.parallelism}} 11 | completionMode: Indexed 12 | template: 13 | spec: 14 | containers: 15 | - name: sleep 16 | image: gcr.io/k8s-staging-perf-tests/sleep:v0.1.0 17 | args: 18 | - {{.runtime}} 19 | imagePullPolicy: IfNotPresent 20 | restartPolicy: Never 21 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-jobs-shared/job.yml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: {{.JobName}}-{{.Replica}} 5 | labels: 6 | group: test-job 7 | kueue.x-k8s.io/queue-name: kueue-scale 8 | spec: 9 | parallelism: {{.parallelism}} 10 | completions: {{.parallelism}} 11 | completionMode: Indexed 12 | template: 13 | spec: 14 | containers: 15 | - name: sleep 16 | image: gcr.io/k8s-staging-perf-tests/sleep:v0.1.0 17 | args: 18 | - {{.runtime}} 19 | imagePullPolicy: IfNotPresent 20 | restartPolicy: Never 21 | -------------------------------------------------------------------------------- /cmd/config/virt-clone/templates/baseImageDataVolume.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: cdi.kubevirt.io/v1beta1 3 | kind: DataVolume 4 | metadata: 5 | name: {{ .cloneDataVolumeName }} 6 | annotations: 7 | cdi.kubevirt.io/storage.bind.immediate.requested: "true" 8 | spec: 9 | source: 10 | pvc: 11 | namespace: {{ .baseVMNamespace }} 12 | name: {{ .baseVMRootDiskPVCName }} 13 | storage: 14 | accessModes: 15 | - {{ .accessMode }} 16 | resources: 17 | requests: 18 | storage: {{ default "6Gi" .rootVolumeSize }} 19 | storageClassName: {{ .storageClassName }} 20 | ... -------------------------------------------------------------------------------- /cmd/config/rds-core/service-lb.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: rds-{{.Replica}} 6 | annotations: 7 | metallb.universe.tf/address-pool: address-pool 8 | kube-burner.io/service-latency: "false" 9 | spec: 10 | selector: 11 | app: nginx 12 | ports: 13 | - name: http 14 | protocol: TCP 15 | port: 80 16 | targetPort: 8080 17 | - name: http1 18 | protocol: TCP 19 | port: 81 20 | targetPort: 8080 21 | - name: http2 22 | protocol: TCP 23 | port: 82 24 | targetPort: 8080 25 | type: LoadBalancer 26 | -------------------------------------------------------------------------------- /cmd/config/rds-core/sriov-network.yml: -------------------------------------------------------------------------------- 1 | apiVersion: sriovnetwork.openshift.io/v1 2 | kind: SriovNetwork 3 | metadata: 4 | name: sriov-server-net-{{ .Iteration }}-{{ .Replica }} 5 | namespace: openshift-sriov-network-operator 6 | spec: 7 | ipam: | 8 | { 9 | "type": "static", 10 | "addresses": [ 11 | { 12 | "address": "10.1.54.0/24" 13 | } 14 | ] 15 | } 16 | logLevel: info #debug 17 | spoofChk: "off" 18 | trust: "on" 19 | resourceName: {{ .sriovNetDevicepool }} 20 | networkNamespace: rds-{{ .Iteration }} 21 | #capabilities: '{ "dpdk": true }' 22 | -------------------------------------------------------------------------------- /cmd/config/whereabouts/ipam-fast.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: k8s.cni.cncf.io/v1 3 | kind: NetworkAttachmentDefinition 4 | metadata: 5 | name: bridge-whereabouts-10-1-0-0 6 | spec: 7 | config: |- 8 | { 9 | "cniVersion": "0.3.1", 10 | "name": "bridge-whereabouts-10-1-0-0", 11 | "type": "bridge", 12 | "bridge": "cni0", 13 | "ipam": { 14 | "type": "whereabouts", 15 | "range": "10.1.0.0/16", 16 | "fast_ipam": true, 17 | "node_slice_size": "/24" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Default owners 2 | * @rsevilla87 @vishnuchalla @smalleni 3 | * @kube-burner/maintainers @kube-burner/ocp-perfscale 4 | # web-burner owners 5 | /cmd/config/web-burner @kube-burner/ocp-perfscale-telco 6 | /cmd/config/rds-core @kube-burner/ocp-perfscale-telco 7 | /pkg/workloads/web-burner.go @kube-burner/ocp-perfscale-telco 8 | /pkg/workloads/rds-core.go @kube-burner/ocp-perfscale-telco 9 | -------------------------------------------------------------------------------- /cmd/config/dv-clone/templates/cloneImageDataVolume.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: cdi.kubevirt.io/v1beta1 3 | kind: DataVolume 4 | metadata: 5 | name: "{{ .dataVolumeName }}-{{ .Iteration }}-{{ .Replica }}" 6 | annotations: 7 | cdi.kubevirt.io/storage.bind.immediate.requested: "true" 8 | spec: 9 | sourceRef: 10 | kind: DataSource 11 | name: {{ .dataSourceName }} 12 | namespace: {{ .dataSourceNamespace }} 13 | storage: 14 | accessModes: 15 | - {{ .accessMode }} 16 | resources: 17 | requests: 18 | storage: {{ .dataVolumeSize }} 19 | storageClassName: {{ .storageClassName }} 20 | ... -------------------------------------------------------------------------------- /pkg/measurements/routeadvertisement-latency_unspecified.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | // +build !linux 3 | 4 | package measurements 5 | 6 | import ( 7 | "fmt" 8 | 9 | "github.com/kube-burner/kube-burner/v2/pkg/config" 10 | "github.com/kube-burner/kube-burner/v2/pkg/measurements" 11 | "github.com/kube-burner/kube-burner/v2/pkg/measurements/types" 12 | ) 13 | 14 | func NewRaLatencyMeasurementFactory(configSpec config.Spec, measurement types.Measurement, metadata map[string]any) (measurements.MeasurementFactory, error) { 15 | return nil, fmt.Errorf("raLatencyMeasurement is supported only when running on Linux") 16 | } 17 | -------------------------------------------------------------------------------- /test/hack/kueue/manifests.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: openshift-kueue-operator 6 | --- 7 | apiVersion: operators.coreos.com/v1 8 | kind: OperatorGroup 9 | metadata: 10 | name: openshift-kueue-operator 11 | namespace: openshift-kueue-operator 12 | --- 13 | apiVersion: operators.coreos.com/v1alpha1 14 | kind: Subscription 15 | metadata: 16 | name: kueue-operator 17 | namespace: openshift-kueue-operator 18 | spec: 19 | channel: stable-v1.0 20 | installPlanApproval: Automatic 21 | name: kueue-operator 22 | source: redhat-operators 23 | sourceNamespace: openshift-marketplace 24 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/anp-allow-openshift-kubeapi.yml: -------------------------------------------------------------------------------- 1 | apiVersion: policy.networking.k8s.io/v1alpha1 2 | kind: AdminNetworkPolicy 3 | metadata: 4 | name: anp-allow-openshift-kubeapi 5 | spec: 6 | priority: 4 7 | subject: 8 | namespaces: {} 9 | egress: 10 | - name: "allow-egress-to-kube-apiserver" 11 | action: "Allow" 12 | ports: 13 | - portNumber: 14 | port: 6443 15 | protocol: TCP 16 | - portNumber: 17 | port: 443 18 | protocol: TCP 19 | to: 20 | - namespaces: 21 | matchLabels: 22 | kubernetes.io/metadata.name: openshift-kube-apiserver 23 | -------------------------------------------------------------------------------- /cmd/config/rds-core/np-allow-from-clients.yml: -------------------------------------------------------------------------------- 1 | kind: NetworkPolicy 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: allow-from-clients-{{.Replica}} 5 | spec: 6 | podSelector: 7 | matchLabels: 8 | app: nginx 9 | ingress: 10 | - from: 11 | - namespaceSelector: 12 | matchLabels: 13 | kubernetes.io/metadata.name: rds-{{.Iteration}} 14 | podSelector: 15 | matchLabels: 16 | app: client 17 | - namespaceSelector: 18 | matchLabels: 19 | kubernetes.io/metadata.name: kube-burner-service-latency 20 | ports: 21 | - protocol: TCP 22 | port: 8080 23 | -------------------------------------------------------------------------------- /.github/workflows/linters.yml: -------------------------------------------------------------------------------- 1 | name: Linters 2 | on: 3 | workflow_call: 4 | jobs: 5 | linters: 6 | runs-on: ubuntu-latest 7 | steps: 8 | 9 | - name: Check out code 10 | uses: actions/checkout@v4 11 | with: 12 | fetch-depth: 1 13 | ref: ${{ github.event.pull_request.head.sha }} 14 | persist-credentials: false 15 | 16 | - name: Set up Go 1.23 17 | uses: actions/setup-go@v5 18 | with: 19 | go-version: 1.23 20 | 21 | - name: Install pre-commit 22 | run: pip install pre-commit 23 | 24 | - name: Run pre-commit hooks 25 | run: pre-commit run --all-files 26 | -------------------------------------------------------------------------------- /cmd/config/udn-density-pods/np-allow-from-clients.yml: -------------------------------------------------------------------------------- 1 | kind: NetworkPolicy 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: allow-from-clients-{{.Replica}} 5 | spec: 6 | podSelector: 7 | matchLabels: 8 | app: nginx 9 | ingress: 10 | - from: 11 | - namespaceSelector: 12 | matchLabels: 13 | kubernetes.io/metadata.name: udn-density-pods-{{.Iteration}} 14 | podSelector: 15 | matchLabels: 16 | app: client 17 | - namespaceSelector: 18 | matchLabels: 19 | kubernetes.io/metadata.name: kube-burner-service-latency 20 | ports: 21 | - protocol: TCP 22 | port: 8080 23 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/np-allow-from-clients.yml: -------------------------------------------------------------------------------- 1 | kind: NetworkPolicy 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: allow-from-clients-{{.Replica}} 5 | spec: 6 | podSelector: 7 | matchLabels: 8 | app: nginx 9 | ingress: 10 | - from: 11 | - namespaceSelector: 12 | matchLabels: 13 | kubernetes.io/metadata.name: cluster-density-v2-{{.Iteration}} 14 | podSelector: 15 | matchLabels: 16 | app: client 17 | - namespaceSelector: 18 | matchLabels: 19 | kubernetes.io/metadata.name: kube-burner-service-latency 20 | ports: 21 | - protocol: TCP 22 | port: 8080 23 | -------------------------------------------------------------------------------- /cmd/config/web-burner-init/macvlan_network.yml: -------------------------------------------------------------------------------- 1 | apiVersion: k8s.cni.cncf.io/v1 2 | kind: NetworkAttachmentDefinition 3 | metadata: 4 | name: sriov-net-{{ .Iteration }} 5 | spec: 6 | config: |- 7 | { 8 | "cniVersion": "0.3.1", 9 | "name": "internal-net", 10 | "plugins": [ 11 | { 12 | "type": "macvlan", 13 | "master": "{{.bridge}}", 14 | "mode": "bridge", 15 | "ipam": { 16 | "type": "static" 17 | } 18 | }, 19 | { 20 | "capabilities": { 21 | "mac": true, 22 | "ips": true 23 | }, 24 | "type": "tuning" 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Mark stale issues and pull requests 2 | 3 | on: 4 | schedule: 5 | - cron: "0 12 * * *" 6 | 7 | jobs: 8 | stale: 9 | permissions: 10 | issues: write 11 | pull-requests: write 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/stale@v8 16 | with: 17 | stale-issue-message: 'This issue has become stale and will be closed automatically within 7 days.' 18 | stale-pr-message: 'This pull request has become stale and will be closed automatically within 7 days.' 19 | stale-issue-label: 'stale' 20 | stale-pr-label: 'stale' 21 | days-before-stale: 90 22 | days-before-close: 7 23 | -------------------------------------------------------------------------------- /.github/workflows/ci-tests.yml: -------------------------------------------------------------------------------- 1 | name: CI tests 2 | on: 3 | workflow_call: 4 | workflow_dispatch: 5 | pull_request_target: 6 | types: [opened, synchronize, reopened, labeled] 7 | branches: 8 | - master 9 | - main 10 | 11 | jobs: 12 | codeql: 13 | uses: ./.github/workflows/codeql.yml 14 | 15 | lint: 16 | uses: ./.github/workflows/linters.yml 17 | 18 | build-matrix: 19 | uses: ./.github/workflows/build-matrix.yml 20 | 21 | build: 22 | uses: ./.github/workflows/builders.yml 23 | 24 | tests: 25 | needs: build 26 | if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }} 27 | uses: ./.github/workflows/test-ocp.yml 28 | secrets: inherit 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '[RFE]' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | ocp/build.yml 2 | ocp/metrics-aggregated.yml 3 | ocp/node-density.yml 4 | ocp/pod.yml 5 | ocp/app-deployment.yml 6 | ocp/cluster-density-ms.yml 7 | ocp/cluster-density-v2.yml 8 | ocp/cluster-density.yml 9 | ocp/configmap.yml 10 | ocp/curl-deployment.yml 11 | ocp/deployment-client.yml 12 | ocp/deployment-server.yml 13 | ocp/deployment.yml 14 | ocp/imagestream.yml 15 | ocp/node-density-cni.yml 16 | ocp/node-density-heavy.yml 17 | ocp/np-allow-from-clients.yml 18 | ocp/np-allow-from-ingress.yml 19 | ocp/np-deny-all.yml 20 | ocp/postgres-deployment.yml 21 | ocp/postgres-service.yml 22 | ocp/route.yml 23 | ocp/secret.yml 24 | ocp/service.yml 25 | ocp/webserver-deployment.yml 26 | ocp/webserver-service.yml 27 | report.xml 28 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/golangci/golangci-lint 3 | rev: v1.60.3 4 | hooks: 5 | - id: golangci-lint 6 | entry: golangci-lint run 7 | args: [--timeout=5m] 8 | - repo: https://github.com/igorshubovych/markdownlint-cli 9 | rev: v0.34.0 10 | hooks: 11 | - id: markdownlint 12 | args: [--disable, MD013, MD002] 13 | - repo: https://github.com/jumanjihouse/pre-commit-hooks 14 | rev: 3.0.0 15 | hooks: 16 | - id: shellcheck 17 | - repo: https://github.com/pre-commit/pre-commit-hooks 18 | rev: v4.4.0 19 | hooks: 20 | - id: check-json 21 | - repo: https://github.com/codespell-project/codespell 22 | rev: v2.4.1 23 | hooks: 24 | - id: codespell 25 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/build.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Build 3 | apiVersion: build.openshift.io/v1 4 | metadata: 5 | name: {{.JobName}}-{{.Replica}} 6 | spec: 7 | resources: 8 | requests: 9 | cpu: 70m 10 | memory: "10Mi" 11 | nodeSelector: 12 | node-role.kubernetes.io/worker: "" 13 | serviceAccount: builder 14 | source: 15 | dockerfile: |- 16 | FROM registry.fedoraproject.org/fedora-minimal:latest 17 | RUN touch $(date +%s) 18 | type: Dockerfile 19 | strategy: 20 | dockerStrategy: 21 | from: 22 | kind: DockerImage 23 | name: registry.fedoraproject.org/fedora-minimal:latest 24 | type: Source 25 | output: 26 | to: 27 | kind: ImageStreamTag 28 | name: cluster-density-{{.Replica}}:latest 29 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | name: CodeQL 2 | on: 3 | workflow_call: 4 | jobs: 5 | analyze: 6 | runs-on: ubuntu-latest 7 | permissions: 8 | actions: read 9 | contents: read 10 | security-events: write 11 | 12 | strategy: 13 | fail-fast: false 14 | 15 | steps: 16 | 17 | - name: Check out code 18 | uses: actions/checkout@v4 19 | with: 20 | fetch-depth: 1 21 | ref: ${{ github.event.pull_request.head.sha }} 22 | persist-credentials: false 23 | 24 | - name: Initialize CodeQL 25 | uses: github/codeql-action/init@v2 26 | 27 | - name: Autobuild 28 | uses: github/codeql-action/autobuild@v2 29 | 30 | - name: Perform CodeQL Analysis 31 | uses: github/codeql-action/analyze@v2 32 | -------------------------------------------------------------------------------- /.github/workflows/gorelease.yml: -------------------------------------------------------------------------------- 1 | # gorelease.yml 2 | name: Create a new release of project 3 | on: 4 | workflow_call: 5 | jobs: 6 | release-go: 7 | name: GoReleaser build 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Check out code into the Go module directory 11 | uses: actions/checkout@v4 12 | with: 13 | fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ 14 | persist-credentials: false 15 | 16 | - name: Set up Go 1.23 17 | uses: actions/setup-go@v5 18 | with: 19 | go-version: 1.23 20 | 21 | - name: Run GoReleaser 22 | uses: goreleaser/goreleaser-action@master 23 | with: 24 | version: 1.21.1 25 | args: release --clean 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: '' 7 | --- 8 | 9 | # Bug Description 10 | 11 | ## **Output of `kube-burner-ocp` version** 12 | 13 | ## **Describe the bug** 14 | 15 | A clear and concise description of what the bug is. 16 | 17 | ## **To Reproduce** 18 | 19 | Steps to reproduce the behavior: 20 | 21 | 1. Go to '...' 22 | 1. Click on '....' 23 | 1. Scroll down to '....' 24 | 1. See error 25 | 26 | ## **Expected behavior** 27 | 28 | A clear and concise description of what you expected to happen. 29 | 30 | ## **Screenshots or output** 31 | 32 | If applicable, add screenshots or kube-burner output to help explain your problem. 33 | 34 | ## **Additional context** 35 | 36 | Add any other context about the problem here. 37 | -------------------------------------------------------------------------------- /.github/workflows/build-matrix.yml: -------------------------------------------------------------------------------- 1 | name: Build kube-burner-ocp for all targets 2 | on: 3 | workflow_call: 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | strategy: 9 | matrix: 10 | goos: 11 | - linux 12 | - windows 13 | - darwin 14 | goarch: 15 | - amd64 16 | - arm64 17 | 18 | steps: 19 | - uses: actions/checkout@v4 20 | with: 21 | fetch-depth: 1 22 | ref: ${{ github.event.pull_request.head.sha }} 23 | persist-credentials: false 24 | 25 | - name: Set up Go 1.23 26 | uses: actions/setup-go@v5 27 | with: 28 | go-version: 1.23 29 | 30 | - name: Build 31 | env: 32 | GOOS: ${{ matrix.goos }} 33 | GOARCH: ${{ matrix.goarch }} 34 | run: make build 35 | -------------------------------------------------------------------------------- /cmd/config/crd-scale/example-crd.yml: -------------------------------------------------------------------------------- 1 | apiVersion: apiextensions.k8s.io/v1 2 | kind: CustomResourceDefinition 3 | metadata: 4 | name: kubeburners{{.Iteration}}.cloudbulldozer.example.com 5 | spec: 6 | group: cloudbulldozer.example.com 7 | versions: 8 | - name: v1 9 | served: true 10 | storage: true 11 | schema: 12 | openAPIV3Schema: 13 | type: object 14 | properties: 15 | spec: 16 | type: object 17 | properties: 18 | workload: 19 | type: string 20 | iterations: 21 | type: integer 22 | scope: Namespaced 23 | names: 24 | plural: kubeburners{{.Iteration}} 25 | singular: kubeburner{{.Iteration}} 26 | kind: KubeBurner{{.Iteration}} 27 | shortNames: 28 | - kb{{.Iteration}} 29 | 30 | -------------------------------------------------------------------------------- /cmd/config/network-policy/pod.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: test-pod-{{.Replica}} 5 | labels: 6 | num: "{{.Replica}}" 7 | spec: 8 | containers: 9 | - name: webserver 10 | image: quay.io/cloud-bulldozer/sampleapp:latest 11 | resources: 12 | requests: 13 | memory: "10Mi" 14 | cpu: "10m" 15 | imagePullPolicy: IfNotPresent 16 | ports: 17 | - containerPort: 8080 18 | protocol: TCP 19 | securityContext: 20 | privileged: false 21 | - name: curlapp 22 | image: quay.io/cloud-bulldozer/netpolvalidator:latest 23 | resources: 24 | requests: 25 | memory: "10Mi" 26 | cpu: "10m" 27 | imagePullPolicy: IfNotPresent 28 | ports: 29 | - containerPort: 9001 30 | protocol: TCP 31 | securityContext: 32 | privileged: false 33 | -------------------------------------------------------------------------------- /cmd/config/rds-core/service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: rds-{{add .Replica 1}} 6 | spec: 7 | selector: 8 | app: nginx 9 | type: ClusterIP 10 | ports: 11 | - name: http 12 | protocol: TCP 13 | port: 80 14 | targetPort: 8080 15 | - name: http1 16 | protocol: TCP 17 | port: 81 18 | targetPort: 8080 19 | - name: http2 20 | protocol: TCP 21 | port: 82 22 | targetPort: 8080 23 | - name: http3 24 | protocol: TCP 25 | port: 83 26 | targetPort: 8080 27 | - name: http4 28 | protocol: TCP 29 | port: 84 30 | targetPort: 8080 31 | - name: http5 32 | protocol: TCP 33 | port: 85 34 | targetPort: 8080 35 | - name: http6 36 | protocol: TCP 37 | port: 86 38 | targetPort: 8080 39 | -------------------------------------------------------------------------------- /cmd/config/metrics-profiles/metrics-report-stackrox.yml: -------------------------------------------------------------------------------- 1 | # stackrox 2 | 3 | - query: avg(avg_over_time(irate(container_cpu_usage_seconds_total{name!="", namespace="stackrox", container!="POD"}[2m])[{{.elapsed}}:])) by (container) 4 | metricName: cpu-stackrox 5 | instant: true 6 | 7 | - query: max(max_over_time(irate(container_cpu_usage_seconds_total{name!="", namespace="stackrox", container!="POD"}[2m])[{{.elapsed}}:])) by (container) 8 | metricName: max-cpu-stackrox 9 | instant: true 10 | 11 | - query: avg(avg_over_time(container_memory_rss{name!="", namespace="stackrox", container!="POD"}[{{.elapsed}}:])) by (container) 12 | metricName: memory-stackrox 13 | instant: true 14 | 15 | - query: max(avg_over_time(container_memory_rss{name!="", namespace="stackrox", container!="POD"}[{{.elapsed}}:])) by (container) 16 | metricName: max-memory-stackrox 17 | instant: true 18 | -------------------------------------------------------------------------------- /pkg/workloads/types.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Kube-burner Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package workloads 16 | 17 | type ProfileType string 18 | 19 | const ( 20 | Regular ProfileType = "regular" 21 | Reporting ProfileType = "reporting" 22 | Both ProfileType = "both" 23 | TenMinutes int64 = 600 24 | ) 25 | -------------------------------------------------------------------------------- /.github/workflows/builders.yml: -------------------------------------------------------------------------------- 1 | name: Build kube-burner-ocp 2 | on: 3 | workflow_call: 4 | jobs: 5 | build: 6 | runs-on: ubuntu-latest 7 | steps: 8 | 9 | - uses: actions/checkout@v4 10 | with: 11 | fetch-depth: 1 12 | ref: ${{ github.event.pull_request.head.sha }} 13 | persist-credentials: false 14 | 15 | - name: Set up Go 1.23 16 | uses: actions/setup-go@v5 17 | with: 18 | go-version: 1.23 19 | 20 | - name: Build code 21 | run: make build 22 | 23 | - name: Install mkdocs dependencies 24 | run: pip install mkdocs-material mkdocs-include-markdown-plugin mike 25 | 26 | - name: Build documentation 27 | run: mkdocs build 28 | 29 | - name: Install 30 | run: sudo make install 31 | 32 | - uses: actions/upload-artifact@v4 33 | with: 34 | name: kube-burner-ocp 35 | path: /usr/bin/kube-burner-ocp 36 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/anp-pod-selector-no-traffic-open-from-cidr.yml: -------------------------------------------------------------------------------- 1 | apiVersion: policy.networking.k8s.io/v1alpha1 2 | kind: AdminNetworkPolicy 3 | metadata: 4 | name: anp-pod-selector-no-traffic-open-from-cidr-p12 5 | spec: 6 | priority: 12 7 | subject: 8 | pods: 9 | namespaceSelector: 10 | matchLabels: 11 | tenant: anp-open 12 | podSelector: 13 | matchLabels: 14 | tenant: anp-open 15 | ingress: 16 | - name: "deny-all-ingress-from-anp-cidr" 17 | action: "Deny" 18 | from: 19 | - pods: 20 | namespaceSelector: 21 | matchLabels: 22 | tenant: anp-cidr 23 | podSelector: 24 | matchLabels: 25 | tenant: anp-cidr 26 | egress: 27 | - name: "deny-all-egress-to-anp-cidr" 28 | action: "Deny" 29 | to: 30 | - pods: 31 | namespaceSelector: 32 | matchLabels: 33 | tenant: anp-cidr 34 | podSelector: 35 | matchLabels: 36 | tenant: anp-cidr 37 | -------------------------------------------------------------------------------- /cmd/config/pvc-density/pod.yml: -------------------------------------------------------------------------------- 1 | kind: Pod 2 | apiVersion: v1 3 | metadata: 4 | labels: 5 | app: pvc-density-{{.Iteration}} 6 | name: pod-{{.Iteration}} 7 | spec: 8 | affinity: 9 | nodeAffinity: 10 | requiredDuringSchedulingIgnoredDuringExecution: 11 | nodeSelectorTerms: 12 | - matchExpressions: 13 | - key: node-role.kubernetes.io/worker 14 | operator: Exists 15 | - key: node-role.kubernetes.io/infra 16 | operator: DoesNotExist 17 | - key: node-role.kubernetes.io/workload 18 | operator: DoesNotExist 19 | tolerations: 20 | - key: os 21 | value: Windows 22 | effect: NoSchedule 23 | volumes: 24 | - name: storage-stress-vlm-{{.Iteration}} 25 | persistentVolumeClaim: 26 | claimName: pvc-{{.Iteration}} 27 | containers: 28 | - image: {{.containerImage}} 29 | name: pvc-density-container 30 | resources: 31 | requests: 32 | memory: "10Mi" 33 | cpu: "10m" 34 | imagePullPolicy: IfNotPresent 35 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/anp-pod-selector-no-traffic-restricted-from-cidr.yml: -------------------------------------------------------------------------------- 1 | apiVersion: policy.networking.k8s.io/v1alpha1 2 | kind: AdminNetworkPolicy 3 | metadata: 4 | name: anp-pod-selector-no-traffic-restricted-from-cidr-p13 5 | spec: 6 | priority: 13 7 | subject: 8 | pods: 9 | namespaceSelector: 10 | matchLabels: 11 | tenant: anp-restricted 12 | podSelector: 13 | matchLabels: 14 | tenant: anp-restricted 15 | ingress: 16 | - name: "deny-all-ingress-from-anp-cidr" 17 | action: "Deny" 18 | from: 19 | - pods: 20 | namespaceSelector: 21 | matchLabels: 22 | tenant: anp-cidr 23 | podSelector: 24 | matchLabels: 25 | tenant: anp-cidr 26 | egress: 27 | - name: "deny-all-egress-to-anp-cidr" 28 | action: "Deny" 29 | to: 30 | - pods: 31 | namespaceSelector: 32 | matchLabels: 33 | tenant: anp-cidr 34 | podSelector: 35 | matchLabels: 36 | tenant: anp-cidr 37 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/anp-pod-selector-policy-rules-restricted-and-open.yml: -------------------------------------------------------------------------------- 1 | apiVersion: policy.networking.k8s.io/v1alpha1 2 | kind: AdminNetworkPolicy 3 | metadata: 4 | name: anp-pod-selector-policy-rules-restricted-and-open-p11 5 | spec: 6 | priority: 11 7 | subject: 8 | pods: 9 | namespaceSelector: 10 | matchLabels: 11 | tenant: anp-restricted 12 | podSelector: 13 | matchLabels: 14 | tenant: anp-restricted 15 | ingress: 16 | - name: "deny-all-ingress-from-anp-open" 17 | action: "Deny" 18 | from: 19 | - pods: 20 | namespaceSelector: 21 | matchLabels: 22 | tenant: anp-open 23 | podSelector: 24 | matchLabels: 25 | tenant: anp-open 26 | egress: 27 | - name: "allow-all-egress-to-anp-open" 28 | action: "Allow" 29 | to: 30 | - pods: 31 | namespaceSelector: 32 | matchLabels: 33 | tenant: anp-open 34 | podSelector: 35 | matchLabels: 36 | tenant: anp-open 37 | -------------------------------------------------------------------------------- /cmd/config/web-burner-init/pod_served.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Deployment 3 | apiVersion: apps/v1 4 | metadata: 5 | name: dep-served-init-{{ .Iteration }}-{{ .Replica }}-{{.JobName }} 6 | spec: 7 | template: 8 | metadata: 9 | name: pod-served-{{ .Iteration }}-{{ .Replica }}-{{.JobName }} 10 | labels: 11 | app: served-init-{{ .Iteration }}-{{ .Replica }}-{{.JobName }} 12 | spec: 13 | containers: 14 | - args: 15 | - sleep 16 | - infinity 17 | name: app 18 | image: quay.io/centos/centos 19 | ports: 20 | - containerPort: 80 21 | affinity: 22 | nodeAffinity: 23 | requiredDuringSchedulingIgnoredDuringExecution: 24 | nodeSelectorTerms: 25 | - matchExpressions: 26 | - key: node-role.kubernetes.io/worker-spk 27 | operator: DoesNotExist 28 | replicas: 1 29 | selector: 30 | matchLabels: 31 | app: served-init-{{ .Iteration }}-{{ .Replica }}-{{.JobName }} 32 | strategy: 33 | type: RollingUpdate 34 | -------------------------------------------------------------------------------- /cmd/config/udn-bgp/cudn.yml: -------------------------------------------------------------------------------- 1 | apiVersion: k8s.ovn.org/v1 2 | kind: ClusterUserDefinedNetwork 3 | metadata: 4 | name: cudn-{{.Iteration}} 5 | labels: 6 | cudn-{{.Iteration}}: "" 7 | spec: 8 | {{- $nsList := list }} 9 | {{- $nsStart := mul $.Iteration $.namespaces_per_cudn }} 10 | {{- range $i, $v := until $.namespaces_per_cudn }} 11 | {{- $nextNs := mod (add $nsStart $i) $.total_namespaces }} 12 | {{- $next_namespace := print "udn-bgp-" $nextNs }} 13 | {{- $nsList = append $nsList $next_namespace }} 14 | {{- end }} 15 | {{- $nsNames := toJson $nsList }} 16 | namespaceSelector: 17 | matchExpressions: 18 | - key: kubernetes.io/metadata.name 19 | operator: In 20 | values: {{$nsNames}} 21 | {{- $firstOctet := add (div $.Iteration 255) 40 }} 22 | {{- $secondOctet := mod $.Iteration 255 }} 23 | {{- $cudnCidr := print $firstOctet "." $secondOctet ".0.0/16" }} 24 | network: 25 | topology: Layer3 26 | layer3: 27 | role: Primary 28 | subnets: 29 | - cidr: {{$cudnCidr}} 30 | hostSubnet: 24 31 | -------------------------------------------------------------------------------- /cmd/config/crd-scale/crd-scale.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | metricsEndpoints: 6 | {{ if .ES_SERVER }} 7 | - metrics: [{{.METRICS}}] 8 | alerts: [{{.ALERTS}}] 9 | indexer: 10 | esServers: ["{{.ES_SERVER}}"] 11 | insecureSkipVerify: true 12 | defaultIndex: {{.ES_INDEX}} 13 | type: opensearch 14 | {{ end }} 15 | {{ if .LOCAL_INDEXING }} 16 | - metrics: [{{.METRICS}}] 17 | alerts: [{{.ALERTS}}] 18 | indexer: 19 | type: local 20 | metricsDirectory: collected-metrics-{{.UUID}} 21 | {{ end }} 22 | 23 | jobs: 24 | - name: crd-scale 25 | jobIterations: {{.JOB_ITERATIONS}} 26 | qps: {{.QPS}} 27 | burst: {{.BURST}} 28 | namespacedIterations: false 29 | preLoadImages: false 30 | waitWhenFinished: true 31 | objects: 32 | - objectTemplate: example-crd.yml 33 | replicas: 1 34 | waitOptions: 35 | customStatusPaths: 36 | - key: '(.conditions.[] | select(.type == "Established")).status' 37 | value: "True" 38 | 39 | -------------------------------------------------------------------------------- /cmd/config/node-scale/pod.yml: -------------------------------------------------------------------------------- 1 | kind: Pod 2 | apiVersion: v1 3 | metadata: 4 | labels: 5 | name: node-scale-{{.Iteration}} 6 | app: hollow-node 7 | name: kubemark-node-{{.Iteration}} 8 | namespace: kubemark 9 | spec: 10 | containers: 11 | - args: 12 | - --v=3 13 | - --morph=kubelet 14 | - --name=kubemark-node-{{.Iteration}} 15 | - --extended-resources=cpu={{.cpu}},memory={{.memory}}G 16 | - --max-pods={{.maxPods}} 17 | command: 18 | - /kubemark 19 | image: "quay.io/cluster-api-provider-kubemark/kubemark:{{.tag}}" 20 | name: hollow-node 21 | securityContext: 22 | privileged: true 23 | volumeMounts: 24 | - mountPath: /kubeconfig 25 | name: kubeconfig 26 | - mountPath: /run/containerd/containerd.sock 27 | name: containerd-sock 28 | volumes: 29 | - name: kubeconfig 30 | secret: 31 | defaultMode: 420 32 | secretName: kubeconfig 33 | - hostPath: 34 | path: /run/crio/crio.sock 35 | type: Socket 36 | name: containerd-sock 37 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/banp-default-deny-traffic.yml: -------------------------------------------------------------------------------- 1 | apiVersion: policy.networking.k8s.io/v1alpha1 2 | kind: BaselineAdminNetworkPolicy 3 | metadata: 4 | name: default 5 | spec: 6 | subject: 7 | namespaces: 8 | matchExpressions: 9 | - key: tenant 10 | operator: In 11 | values: ["anp-cidr","anp-restricted"] 12 | ingress: 13 | - name: "deny-all-ingress-from-any-ns" 14 | action: "Deny" 15 | from: 16 | - namespaces: {} 17 | egress: 18 | - name: egress-deny-all-traffic-to-any-network 19 | action: Deny 20 | to: 21 | - networks: 22 | - 0.0.0.0/0 23 | - action: Deny 24 | name: egress-deny-all-traffic-to-any-node 25 | to: 26 | - nodes: 27 | matchExpressions: 28 | - key: kubernetes.io/hostname 29 | operator: Exists 30 | - name: "egress-deny-all-to-anp-open" 31 | action: "Deny" 32 | to: 33 | - pods: 34 | namespaceSelector: 35 | matchLabels: 36 | tenant: anp-open 37 | podSelector: 38 | matchLabels: 39 | tenant: anp-open 40 | -------------------------------------------------------------------------------- /test/ocp/pod.yaml: -------------------------------------------------------------------------------- 1 | kind: Pod 2 | apiVersion: v1 3 | metadata: 4 | labels: 5 | name: node-density-{{.Iteration}} 6 | app: pause 7 | name: {{.JobName}}-{{.Iteration}} 8 | spec: 9 | topologySpreadConstraints: 10 | - maxSkew: 1 11 | topologyKey: kubernetes.io/hostname 12 | whenUnsatisfiable: ScheduleAnyway 13 | labelSelector: 14 | matchLabels: 15 | app: pause 16 | affinity: 17 | nodeAffinity: 18 | requiredDuringSchedulingIgnoredDuringExecution: 19 | nodeSelectorTerms: 20 | - matchExpressions: 21 | - key: node-role.kubernetes.io/worker 22 | operator: Exists 23 | - key: node-role.kubernetes.io/infra 24 | operator: DoesNotExist 25 | - key: node-role.kubernetes.io/workload 26 | operator: DoesNotExist 27 | tolerations: 28 | - key: os 29 | value: Windows 30 | effect: NoSchedule 31 | containers: 32 | - image: gcr.io/google_containers/pause:3.1 33 | name: node-density 34 | resources: 35 | requests: 36 | memory: "10Mi" 37 | cpu: "10m" 38 | imagePullPolicy: IfNotPresent -------------------------------------------------------------------------------- /cmd/config/node-density/pod.yml: -------------------------------------------------------------------------------- 1 | kind: Pod 2 | apiVersion: v1 3 | metadata: 4 | labels: 5 | name: node-density-{{.Iteration}} 6 | app: pause 7 | name: {{.JobName}}-{{.Iteration}} 8 | spec: 9 | topologySpreadConstraints: 10 | - maxSkew: 1 11 | topologyKey: kubernetes.io/hostname 12 | whenUnsatisfiable: ScheduleAnyway 13 | labelSelector: 14 | matchLabels: 15 | app: pause 16 | affinity: 17 | nodeAffinity: 18 | requiredDuringSchedulingIgnoredDuringExecution: 19 | nodeSelectorTerms: 20 | - matchExpressions: 21 | - key: node-role.kubernetes.io/worker 22 | operator: Exists 23 | - key: node-role.kubernetes.io/infra 24 | operator: DoesNotExist 25 | - key: node-role.kubernetes.io/workload 26 | operator: DoesNotExist 27 | tolerations: 28 | - key: os 29 | value: Windows 30 | effect: NoSchedule 31 | containers: 32 | - image: {{.containerImage}} 33 | name: node-density 34 | resources: 35 | requests: 36 | memory: "10Mi" 37 | cpu: "10m" 38 | imagePullPolicy: IfNotPresent 39 | -------------------------------------------------------------------------------- /cmd/config/virt-density/vm.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kubevirt.io/v1 2 | kind: VirtualMachine 3 | metadata: 4 | name: virt-density-{{.Iteration}} 5 | spec: 6 | runStrategy: Always 7 | template: 8 | metadata: 9 | labels: 10 | kubevirt.io/os: fedora 11 | spec: 12 | terminationGracePeriodSeconds: 0 13 | domain: 14 | resources: 15 | requests: 16 | memory: 1Gi 17 | devices: 18 | disks: 19 | - name: containerdisk 20 | disk: 21 | bus: virtio 22 | - disk: 23 | bus: virtio 24 | name: cloudinitdisk 25 | - name: emptydisk 26 | disk: 27 | bus: virtio 28 | volumes: 29 | - name: containerdisk 30 | containerDisk: 31 | image: {{.vmImage}} 32 | imagePullPolicy: IfNotPresent 33 | - name: cloudinitdisk 34 | cloudInitNoCloud: 35 | userData: |- 36 | #cloud-config 37 | password: perfscale 38 | chpasswd: { expire: False } 39 | - name: emptydisk 40 | emptyDisk: 41 | capacity: "10Mi" 42 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-pods/pod.yml: -------------------------------------------------------------------------------- 1 | kind: Pod 2 | apiVersion: v1 3 | metadata: 4 | labels: 5 | app: kueue-scale 6 | kueue.x-k8s.io/queue-name: kueue-scale 7 | name: {{.JobName}}-{{.Replica}} 8 | spec: 9 | topologySpreadConstraints: 10 | - maxSkew: 1 11 | topologyKey: kubernetes.io/hostname 12 | whenUnsatisfiable: ScheduleAnyway 13 | labelSelector: 14 | matchLabels: 15 | app: kueue-scale 16 | affinity: 17 | nodeAffinity: 18 | requiredDuringSchedulingIgnoredDuringExecution: 19 | nodeSelectorTerms: 20 | - matchExpressions: 21 | - key: node-role.kubernetes.io/worker 22 | operator: Exists 23 | - key: node-role.kubernetes.io/infra 24 | operator: DoesNotExist 25 | - key: node-role.kubernetes.io/workload 26 | operator: DoesNotExist 27 | containers: 28 | - image: registry.k8s.io/pause:3.1 29 | securityContext: 30 | allowPrivilegeEscalation: false 31 | capabilities: 32 | drop: ["ALL"] 33 | seccompProfile: 34 | type: RuntimeDefault 35 | name: kueue-scale 36 | args: 37 | - {{.runtime}} 38 | imagePullPolicy: IfNotPresent 39 | -------------------------------------------------------------------------------- /.goreleaser.yml: -------------------------------------------------------------------------------- 1 | # This is an example goreleaser.yaml file with some sane defaults. 2 | # Make sure to check the documentation at http://goreleaser.com 3 | before: 4 | hooks: 5 | builds: 6 | - env: 7 | - CGO_ENABLED=0 8 | goos: 9 | - linux 10 | - windows 11 | - darwin 12 | goarch: 13 | - amd64 14 | - arm64 15 | - ppc64le 16 | - s390x 17 | dir: ./cmd/ 18 | ldflags: 19 | - -X github.com/cloud-bulldozer/go-commons/v2/version.GitCommit={{.Commit}} -X github.com/cloud-bulldozer/go-commons/v2/version.BuildDate={{.Date}} -X github.com/cloud-bulldozer/go-commons/v2/version.Version={{.Version}} 20 | archives: 21 | - format: tar.gz 22 | name_template: >- 23 | {{ .ProjectName }}- 24 | {{- title .Tag }}- 25 | {{- .Os }}- 26 | {{- if eq .Arch "amd64" }}x86_64 27 | {{- else if eq .Arch "386" }}i386 28 | {{- else }}{{ .Arch }}{{ end }} 29 | format_overrides: 30 | - goos: windows 31 | format: zip 32 | files: 33 | - LICENSE 34 | changelog: 35 | use: github 36 | sort: asc 37 | filters: 38 | exclude: 39 | - '^docs:' 40 | - '^test:' 41 | checksum: 42 | name_template: "kube-burner-ocp-checksums.txt" 43 | -------------------------------------------------------------------------------- /test/ocp/custom-workload.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | measurements: 6 | - name: podLatency 7 | thresholds: 8 | - conditionType: Ready 9 | metric: P99 10 | threshold: 1m 11 | metricsEndpoints: 12 | {{ if .ES_SERVER }} 13 | - indexer: 14 | esServers: ["{{.ES_SERVER}}"] 15 | insecureSkipVerify: true 16 | defaultIndex: {{.ES_INDEX}} 17 | type: opensearch 18 | {{ end }} 19 | {{ if .LOCAL_INDEXING }} 20 | - indexer: 21 | type: local 22 | metricsDirectory: collected-metrics-{{.UUID}} 23 | {{ end }} 24 | jobs: 25 | - name: node-density 26 | namespace: node-density 27 | jobIterations: 75 28 | qps: {{.QPS}} 29 | burst: {{.BURST}} 30 | namespacedIterations: false 31 | podWait: false 32 | waitWhenFinished: true 33 | preLoadImages: true 34 | preLoadPeriod: 10s 35 | namespaceLabels: 36 | security.openshift.io/scc.podSecurityLabelSync: false 37 | pod-security.kubernetes.io/enforce: privileged 38 | pod-security.kubernetes.io/audit: privileged 39 | pod-security.kubernetes.io/warn: privileged 40 | objects: 41 | 42 | - objectTemplate: pod.yaml 43 | replicas: 1 44 | inputVars: 45 | containerImage: registry.k8s.io/pause:3.1 46 | -------------------------------------------------------------------------------- /cmd/config/web-burner-init/adminPolicyBasedExternalRoute.yml: -------------------------------------------------------------------------------- 1 | apiVersion: k8s.ovn.org/v1 2 | kind: AdminPolicyBasedExternalRoute 3 | metadata: 4 | name: honeypotting-{{ .Iteration }}-{{.JobName }} 5 | spec: 6 | ## gateway example 7 | from: 8 | namespaceSelector: 9 | matchLabels: 10 | {{ if contains .icni "true" }} 11 | kubernetes.io/metadata.name: served-ns-{{ .Iteration }} 12 | {{ else }} 13 | kubernetes.io/metadata.name: nonexisting-ns-{{ .Iteration }} 14 | {{ end }} 15 | nextHops: 16 | # static: 17 | # - ip: "192.168.{{ add 218 .Replica }}.{{ add 1 .Iteration }}" 18 | # bfdEnabled: true 19 | dynamic: 20 | - podSelector: 21 | matchLabels: 22 | {{ if contains .icni "true" }} 23 | lb: lb-{{ .Iteration }} 24 | {{ else }} 25 | lb: nonexisting-lb-{{ .Iteration }} 26 | {{ end }} 27 | {{ if contains .bfd "true" }} 28 | bfdEnabled: true 29 | {{ end }} 30 | namespaceSelector: 31 | matchLabels: 32 | {{ if contains .icni "true" }} 33 | kubernetes.io/metadata.name: serving-ns-{{ .Iteration }} 34 | {{ else }} 35 | kubernetes.io/metadata.name: nonexisting-ns-{{ .Iteration }} 36 | {{ end }} 37 | networkAttachmentName: serving-ns-{{ .Iteration }}/sriov-net-{{ .Iteration }} -------------------------------------------------------------------------------- /dashboards/README.md: -------------------------------------------------------------------------------- 1 | # Grafana Dashboards 2 | 3 | This directory contains Grafana dashboard JSON files for visualizing kube-burner metrics and performance data. 4 | 5 | ## Dashboards 6 | 7 | ### Kube-burner.json 8 | 9 | The `Kube-burner.json` dashboard is designed to visualize metrics collected using the standard kube-burner metrics profiles. 10 | 11 | **Compatible Metrics Profiles:** 12 | 13 | - `metrics.yml` 14 | - `metrics-aggregated.yml` 15 | 16 | ### Kube-burner-report-profile.json 17 | 18 | The `Kube-burner-report-profile.json` dashboard is designed to visualize metrics collected using the report metrics profile. 19 | 20 | **Compatible Metrics Profiles:** 21 | 22 | - `metrics-report.yml` 23 | 24 | ## Importing Dashboards 25 | 26 | To import a dashboard into Grafana: 27 | 28 | 1. Navigate to your Grafana instance 29 | 2. Go to **Dashboards** → **Import** 30 | 3. Upload the JSON file or paste its contents 31 | 4. Click **Import** 32 | 33 | ## Datasource Configuration 34 | 35 | Both dashboards require either Elasticsearch or OpenSearch datasources to be configured in Grafana. 36 | 37 | > [!NOTE] 38 | > Remember to use `timestamp` as Time field name in the datasource 39 | 40 | ## Metrics Profiles Location 41 | 42 | The metrics profiles referenced above can be found in the [metrics-profiles](https://github.com/kube-burner/kube-burner-ocp/tree/master/cmd/config/metrics-profiles) directory. 43 | 44 | -------------------------------------------------------------------------------- /cmd/config/whereabouts/pod.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Pod 3 | apiVersion: v1 4 | metadata: 5 | labels: 6 | name: whereabouts-{{.Iteration}}-{{.Replica}} 7 | app: pause 8 | name: {{.JobName}}-{{.Iteration}}-{{.Replica}} 9 | annotations: 10 | k8s.v1.cni.cncf.io/networks: bridge-whereabouts-10-1-0-0 11 | spec: 12 | topologySpreadConstraints: 13 | - maxSkew: 1 14 | topologyKey: kubernetes.io/hostname 15 | whenUnsatisfiable: ScheduleAnyway 16 | labelSelector: 17 | matchLabels: 18 | app: pause 19 | securityContext: 20 | seccompProfile: 21 | type: RuntimeDefault 22 | runAsNonRoot: true 23 | affinity: 24 | nodeAffinity: 25 | requiredDuringSchedulingIgnoredDuringExecution: 26 | nodeSelectorTerms: 27 | - matchExpressions: 28 | - key: node-role.kubernetes.io/worker 29 | operator: Exists 30 | - key: node-role.kubernetes.io/infra 31 | operator: DoesNotExist 32 | - key: node-role.kubernetes.io/workload 33 | operator: DoesNotExist 34 | containers: 35 | - image: {{.containerImage}} 36 | name: whereabouts 37 | resources: 38 | requests: 39 | memory: "10Mi" 40 | cpu: "10m" 41 | securityContext: 42 | allowPrivilegeEscalation: false 43 | capabilities: 44 | drop: 45 | - ALL 46 | imagePullPolicy: IfNotPresent 47 | -------------------------------------------------------------------------------- /cmd/config/web-burner-init/cm_frr.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: frr 5 | data: 6 | daemons: | 7 | bgpd=no 8 | ospfd=no 9 | ospf6d=no 10 | ripd=no 11 | ripngd=no 12 | isisd=no 13 | pimd=no 14 | ldpd=no 15 | nhrpd=no 16 | eigrpd=no 17 | babeld=no 18 | sharpd=no 19 | pbrd=no 20 | bfdd=yes 21 | fabricd=no 22 | vrrpd=no 23 | vtysh_enable=yes 24 | zebra_options=" -A 127.0.0.1 -s 90000000" 25 | bgpd_options=" -A 127.0.0.1" 26 | ospfd_options=" -A 127.0.0.1" 27 | ospf6d_options=" -A ::1" 28 | ripd_options=" -A 127.0.0.1" 29 | ripngd_options=" -A ::1" 30 | isisd_options=" -A 127.0.0.1" 31 | pimd_options=" -A 127.0.0.1" 32 | ldpd_options=" -A 127.0.0.1" 33 | nhrpd_options=" -A 127.0.0.1" 34 | eigrpd_options=" -A 127.0.0.1" 35 | babeld_options=" -A 127.0.0.1" 36 | sharpd_options=" -A 127.0.0.1" 37 | pbrd_options=" -A 127.0.0.1" 38 | staticd_options="-A 127.0.0.1" 39 | bfdd_options=" -A 127.0.0.1" 40 | fabricd_options="-A 127.0.0.1" 41 | vrrpd_options=" -A 127.0.0.1" 42 | vtysh.conf: | 43 | service integrated-vtysh-config 44 | frr.conf: | 45 | hostname vrouter 46 | service integrated-vtysh-config 47 | password frr 48 | enable password frr 49 | ! 50 | debug bfd peer 51 | debug bfd zebra 52 | debug bfd network 53 | ! 54 | log file /tmp/frr.log debugging 55 | bfd 56 | -------------------------------------------------------------------------------- /cmd/config/web-burner-cluster-density/cluster_density_dep_served_ports.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Deployment 3 | apiVersion: apps/v1 4 | metadata: 5 | name: dep-served-{{ .ns }}-{{ .Replica }} 6 | spec: 7 | template: 8 | metadata: 9 | name: pod-served-{{ .ns }}-{{ .Replica }} 10 | labels: 11 | app: app-served-{{ .ns }} 12 | spec: 13 | containers: 14 | - name: sleep-1 15 | imagePullPolicy: IfNotPresent 16 | image: k8s.gcr.io/pause:3.1 17 | - name: app-served-{{ .ns }} 18 | imagePullPolicy: IfNotPresent 19 | image: quay.io/cloud-bulldozer/sampleapp:latest 20 | ports: 21 | - containerPort: 8080 22 | protocol: TCP 23 | resources: 24 | requests: 25 | memory: '100Mi' 26 | cpu: 100m 27 | limits: 28 | memory: '100Mi' 29 | cpu: 100m 30 | env: 31 | - name: service_name 32 | value: app-served-{{ .ns }} 33 | # nodeSelector: 34 | # kubernetes.io/hostname: worker{{if eq .Iteration 81}}{{printf "%03d" (add .Iteration 2)}}{{else if eq .Iteration 82}}{{printf "%03d" (add .Iteration 1)}}{{else if eq .Iteration 98}}{{printf "%03d" (add .Iteration 2)}}{{else if eq .Iteration 110}}{{printf "%03d" (add .Iteration 2)}}{{else}}{{printf "%03d" (add .Iteration 3)}}{{end}}-r640 35 | replicas: 1 36 | selector: 37 | matchLabels: 38 | app: app-served-{{ .ns }} 39 | strategy: 40 | type: RollingUpdate 41 | -------------------------------------------------------------------------------- /cmd/config/web-burner-cluster-density/cluster_density_dep_served.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Deployment 3 | apiVersion: apps/v1 4 | metadata: 5 | name: dep-served-{{ .Iteration }}-{{ .Replica }}-{{.JobName }} 6 | spec: 7 | template: 8 | metadata: 9 | name: dep-pod-served-{{ .Replica }}-{{.JobName }} 10 | labels: 11 | app: dep-served-{{ .Replica }} 12 | spec: 13 | containers: 14 | - args: 15 | - sleep 16 | - infinity 17 | name: app 18 | image: k8s.gcr.io/pause:3.1 19 | imagePullPolicy: IfNotPresent 20 | ports: 21 | - containerPort: 80 22 | resources: 23 | requests: 24 | memory: '100Mi' 25 | cpu: 100m 26 | limits: 27 | memory: '100Mi' 28 | cpu: 100m 29 | - name: sleep-1 30 | image: k8s.gcr.io/pause:3.1 31 | imagePullPolicy: IfNotPresent 32 | resources: 33 | requests: 34 | memory: '100Mi' 35 | cpu: 100m 36 | limits: 37 | memory: '100Mi' 38 | cpu: 100m 39 | affinity: 40 | nodeAffinity: 41 | requiredDuringSchedulingIgnoredDuringExecution: 42 | nodeSelectorTerms: 43 | - matchExpressions: 44 | - key: node-role.kubernetes.io/worker-spk 45 | operator: DoesNotExist 46 | replicas: 2 47 | selector: 48 | matchLabels: 49 | app: dep-served-{{ .Replica }} 50 | strategy: 51 | type: RollingUpdate 52 | 53 | -------------------------------------------------------------------------------- /cmd/config/virt-udn-density/vm-client.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kubevirt.io/v1 2 | kind: VirtualMachine 3 | metadata: 4 | name: virt-client-{{.Iteration}}-{{.Replica}} 5 | labels: 6 | kubevirt.io/os: fedora 7 | spec: 8 | runStrategy: Always 9 | template: 10 | metadata: 11 | labels: 12 | kubevirt.io/os: fedora 13 | spec: 14 | terminationGracePeriodSeconds: 0 15 | domain: 16 | resources: 17 | requests: 18 | memory: 256Mi 19 | devices: 20 | disks: 21 | - name: containerdisk 22 | disk: 23 | bus: virtio 24 | - disk: 25 | bus: virtio 26 | name: cloudinitdisk 27 | - name: emptydisk 28 | disk: 29 | bus: virtio 30 | interfaces: 31 | - name: primary-udn-net 32 | binding: 33 | name: {{.bindingMethod}} 34 | networks: 35 | - name: primary-udn-net 36 | pod: {} 37 | volumes: 38 | - name: containerdisk 39 | containerDisk: 40 | image: {{.vmImage}} 41 | imagePullPolicy: IfNotPresent 42 | - name: cloudinitdisk 43 | cloudInitNoCloud: 44 | userData: |- 45 | #cloud-config 46 | password: perfscale 47 | chpasswd: { expire: False } 48 | runcmd: 49 | - dnf install -y --nodocs curl 50 | - curl -sS --fail 10.132.0.5 --retry 30 --retry-delay 10 51 | - name: emptydisk 52 | emptyDisk: 53 | capacity: "50Mi" 54 | -------------------------------------------------------------------------------- /cmd/config/web-burner-cluster-density/cluster_density_pod_served.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Pod 4 | metadata: 5 | name: pod-served-{{ .ns }}-{{ .Replica }} 6 | labels: 7 | app: app-served-{{ .ns }} 8 | spec: 9 | containers: 10 | - name: sleep-1 11 | imagePullPolicy: IfNotPresent 12 | image: k8s.gcr.io/pause:3.1 13 | - name: app-served-{{ .ns }} 14 | imagePullPolicy: IfNotPresent 15 | image: quay.io/centos/centos 16 | {{ if contains .probe "true" }} 17 | readinessProbe: 18 | exec: 19 | command: 20 | - ping 21 | - -c1 22 | - 172.18.0.10 23 | {{ end }} 24 | ports: 25 | - containerPort: 8080 26 | protocol: TCP 27 | resources: 28 | requests: 29 | memory: '100Mi' 30 | cpu: 100m 31 | limits: 32 | memory: '100Mi' 33 | cpu: 100m 34 | env: 35 | - name: service_name 36 | value: app-served-{{ .ns }} 37 | # nodeSelector: 38 | # kubernetes.io/hostname: worker{{if eq .Iteration 81}}{{printf "%03d" (add .Iteration 2)}}{{else if eq .Iteration 82}}{{printf "%03d" (add .Iteration 1)}}{{else if eq .Iteration 98}}{{printf "%03d" (add .Iteration 2)}}{{else if eq .Iteration 110}}{{printf "%03d" (add .Iteration 2)}}{{else}}{{printf "%03d" (add .Iteration 3)}}{{end}}-r640 39 | affinity: 40 | nodeAffinity: 41 | requiredDuringSchedulingIgnoredDuringExecution: 42 | nodeSelectorTerms: 43 | - matchExpressions: 44 | - key: node-role.kubernetes.io/worker-spk 45 | operator: DoesNotExist 46 | -------------------------------------------------------------------------------- /cmd/config/web-burner-node-density/node_density_pod_served.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Pod 4 | metadata: 5 | name: pod-served-{{ .Replica }} 6 | labels: 7 | app: pod-served-{{ .Replica }} 8 | ns: served-ns-{{ .Replica }} 9 | spec: 10 | containers: 11 | - name: perfapp-1 12 | image: quay.io/cloud-bulldozer/nginx 13 | imagePullPolicy: IfNotPresent 14 | livenessProbe: 15 | httpGet: 16 | path: / 17 | port: 8080 18 | periodSeconds: 30 19 | failureThreshold: 1 20 | timeoutSeconds: 15 21 | initialDelaySeconds: 5 22 | ports: 23 | - containerPort: 8080 24 | - args: 25 | - sleep 26 | - infinity 27 | name: app 28 | image: quay.io/centos/centos 29 | imagePullPolicy: IfNotPresent 30 | {{ if contains .probe "true" }} 31 | readinessProbe: 32 | exec: 33 | command: 34 | - ping 35 | - -c1 36 | - 172.18.0.10 37 | {{ end }} 38 | # nodeSelector: 39 | # kubernetes.io/hostname: worker{{if eq .Iteration 81}}{{printf "%03d" (add .Iteration 2)}}{{else if eq .Iteration 82}}{{printf "%03d" (add .Iteration 1)}}{{else if eq .Iteration 98}}{{printf "%03d" (add .Iteration 2)}}{{else if eq .Iteration 110}}{{printf "%03d" (add .Iteration 2)}}{{else}}{{printf "%03d" (add .Iteration 3)}}{{end}}-r640 40 | affinity: 41 | nodeAffinity: 42 | requiredDuringSchedulingIgnoredDuringExecution: 43 | nodeSelectorTerms: 44 | - matchExpressions: 45 | - key: node-role.kubernetes.io/worker-spk 46 | operator: DoesNotExist 47 | -------------------------------------------------------------------------------- /cmd/config/node-density-cni/webserver-deployment.yml: -------------------------------------------------------------------------------- 1 | kind: Deployment 2 | apiVersion: apps/v1 3 | metadata: 4 | name: webserver-{{.Replica}}-{{.Iteration}} 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: webserver-{{.Replica}}-{{.Iteration}} 10 | app: webserver 11 | spec: 12 | topologySpreadConstraints: 13 | - maxSkew: 1 14 | topologyKey: kubernetes.io/hostname 15 | whenUnsatisfiable: ScheduleAnyway 16 | labelSelector: 17 | matchLabels: 18 | app: webserver 19 | affinity: 20 | nodeAffinity: 21 | requiredDuringSchedulingIgnoredDuringExecution: 22 | nodeSelectorTerms: 23 | - matchExpressions: 24 | - key: node-role.kubernetes.io/worker 25 | operator: Exists 26 | - key: node-role.kubernetes.io/infra 27 | operator: DoesNotExist 28 | - key: node-role.kubernetes.io/workload 29 | operator: DoesNotExist 30 | containers: 31 | - name: webserver 32 | image: quay.io/cloud-bulldozer/sampleapp:latest 33 | resources: 34 | requests: 35 | memory: "10Mi" 36 | cpu: "10m" 37 | ports: 38 | - containerPort: 8080 39 | protocol: TCP 40 | imagePullPolicy: IfNotPresent 41 | securityContext: 42 | privileged: false 43 | restartPolicy: Always 44 | replicas: 1 45 | selector: 46 | matchLabels: 47 | name: webserver-{{.Replica}}-{{.Iteration}} 48 | strategy: 49 | type: RollingUpdate 50 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-jobs-shared/kueue-operator-jobs-shared.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | measurements: 6 | - name: jobLatency 7 | metricsEndpoints: 8 | 9 | {{ if .ES_SERVER }} 10 | - metrics: [{{.METRICS}}] 11 | alerts: [{{.ALERTS}}] 12 | indexer: 13 | insecureSkipVerify: true 14 | esServers: [{{.ES_SERVER}}] 15 | defaultIndex: {{.ES_INDEX}} 16 | type: opensearch 17 | {{ end }} 18 | {{ if .LOCAL_INDEXING }} 19 | - metrics: [{{.METRICS}}] 20 | alerts: [{{.ALERTS}}] 21 | indexer: 22 | type: local 23 | metricsDirectory: collected-metrics-{{.UUID}} 24 | {{ end }} 25 | 26 | jobs: 27 | 28 | - name: prereqs 29 | jobIterations: 1 30 | skipIndexing: true 31 | qps: 10 32 | burst: 10 33 | objects: 34 | - objectTemplate: cluster-queue.yml 35 | replicas: {{.ITERATIONS}} 36 | inputVars: 37 | PODS_QUOTA: {{.PODS_QUOTA}} 38 | - objectTemplate: resource-flavor.yml 39 | replicas: 1 40 | 41 | - name: kueue-scale-jobs-shared 42 | namespace: kueue-scale 43 | jobIterations: {{.ITERATIONS}} 44 | preLoadImages: true 45 | preLoadPeriod: 5s 46 | namespacedIterations: true 47 | cleanup: true 48 | namespaceLabels: 49 | kueue.openshift.io/managed: "true" 50 | qps: {{.QPS}} 51 | burst: {{.BURST}} 52 | objects: 53 | - objectTemplate: local-queue.yml 54 | replicas: 1 55 | - objectTemplate: job.yml 56 | replicas: {{.JOB_REPLICAS}} 57 | inputVars: 58 | parallelism: {{.PARALLELISM}} 59 | runtime: {{.WORKLOAD_RUNTIME}} 60 | -------------------------------------------------------------------------------- /cmd/config/whereabouts/whereabouts.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | measurements: 6 | - name: podLatency 7 | thresholds: 8 | - conditionType: Ready 9 | metric: P99 10 | threshold: {{.POD_READY_THRESHOLD}} 11 | metricsEndpoints: 12 | {{ if .ES_SERVER }} 13 | - metrics: [{{.METRICS}}] 14 | alerts: [{{.ALERTS}}] 15 | indexer: 16 | esServers: ["{{.ES_SERVER}}"] 17 | insecureSkipVerify: true 18 | defaultIndex: {{.ES_INDEX}} 19 | type: opensearch 20 | {{ end }} 21 | {{ if .LOCAL_INDEXING }} 22 | - metrics: [{{.METRICS}}] 23 | alerts: [{{.ALERTS}}] 24 | indexer: 25 | type: local 26 | metricsDirectory: collected-metrics-{{.UUID}} 27 | {{ end }} 28 | jobs: 29 | - name: whereabouts 30 | namespace: kube-burner-whereabouts-{{.JOB_ITERATIONS}} 31 | jobIterations: {{.JOB_ITERATIONS}} 32 | podWait: true 33 | qps: {{.QPS}} 34 | burst: {{.BURST}} 35 | namespacedIterations: true 36 | waitWhenFinished: true 37 | namespaceLabels: 38 | security.openshift.io/scc.podSecurityLabelSync: false 39 | pod-security.kubernetes.io/enforce: privileged 40 | pod-security.kubernetes.io/audit: privileged 41 | pod-security.kubernetes.io/warn: privileged 42 | objects: 43 | {{ if .FAST }} 44 | - objectTemplate: ipam-fast.yml 45 | replicas: 1 46 | {{ end }} 47 | {{ if not .FAST }} 48 | - objectTemplate: ipam.yml 49 | replicas: 1 50 | {{ end }} 51 | - objectTemplate: pod.yml 52 | replicas: 6 53 | inputVars: 54 | containerImage: registry.k8s.io/pause:3.1 55 | -------------------------------------------------------------------------------- /.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: Deploy docs 2 | on: 3 | workflow_call: 4 | jobs: 5 | deploy-docs: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Check out code 9 | uses: actions/checkout@v4 10 | with: 11 | fetch-depth: 0 12 | 13 | - name: Set up python 14 | uses: actions/setup-python@v5 15 | with: 16 | python-version: 3.x 17 | 18 | - name: Setup doc deploy 19 | run: | 20 | git config --global user.name KBOCPDocs deploy 21 | git config --global user.email kbocpdocs@dummy.bot.com 22 | 23 | - name: Install dependencies 24 | run: pip install mkdocs-material mkdocs-include-markdown-plugin mike 25 | 26 | - name: Deploy docs 27 | run: mike deploy --push -m "Update docs to version ${{ github.ref_name }}" --update-aliases ${{ github.ref_name }} latest 28 | 29 | - name: Delete docs for older tags 30 | run: | 31 | echo "Keeping documentation for latest tags" 32 | all_tags=$(git for-each-ref --sort=-creatordate --format '%(refname:short)' refs/tags) 33 | tags_to_keep=$(echo "$all_tags" | head -n 3) 34 | for tag in $all_tags; do 35 | if [[ $tags_to_keep != *"$tag"* ]]; then 36 | if mike list | grep -q "$tag"; then 37 | echo "Deleting documentation for tag: $tag" 38 | mike delete "$tag" 39 | else 40 | echo "Documentation for tag $tag not found. Skipping deletion." 41 | fi 42 | fi 43 | done 44 | 45 | - name: Set latest as default doc branch 46 | run: mike set-default --push latest 47 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-jobs/kueue-operator-jobs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | measurements: 6 | - name: jobLatency 7 | metricsEndpoints: 8 | 9 | {{ if .ES_SERVER }} 10 | - metrics: [{{.METRICS}}] 11 | alerts: [{{.ALERTS}}] 12 | indexer: 13 | insecureSkipVerify: true 14 | esServers: [{{.ES_SERVER}}] 15 | defaultIndex: {{.ES_INDEX}} 16 | type: opensearch 17 | {{ end }} 18 | {{ if .LOCAL_INDEXING }} 19 | - metrics: [{{.METRICS}}] 20 | alerts: [{{.ALERTS}}] 21 | indexer: 22 | type: local 23 | metricsDirectory: collected-metrics-{{.UUID}} 24 | {{ end }} 25 | 26 | jobs: 27 | 28 | - name: prereqs 29 | jobIterations: 1 30 | preLoadImages: true 31 | namespacedIterations: false 32 | skipIndexing: true 33 | qps: 5 34 | burst: 5 35 | objects: 36 | - objectTemplate: cluster-queue.yml 37 | replicas: 1 38 | inputVars: 39 | PODS_QUOTA: {{.PODS_QUOTA}} 40 | - objectTemplate: resource-flavor.yml 41 | replicas: 1 42 | 43 | - name: kueue-scale-jobs 44 | namespace: kueue-scale 45 | jobIterations: {{.ITERATIONS}} 46 | preLoadImages: true 47 | preLoadPeriod: 5s 48 | namespacedIterations: false 49 | cleanup: true 50 | namespaceLabels: 51 | kueue.openshift.io/managed: "true" 52 | qps: {{.QPS}} 53 | burst: {{.BURST}} 54 | objects: 55 | - objectTemplate: local-queue.yml 56 | replicas: 1 57 | - objectTemplate: job.yml 58 | replicas: {{.JOB_REPLICAS}} 59 | inputVars: 60 | parallelism: {{.PARALLELISM}} 61 | runtime: {{.WORKLOAD_RUNTIME}} 62 | -------------------------------------------------------------------------------- /cmd/config/kueue-operator-pods/kueue-operator-pods.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | measurements: 6 | - name: podLatency 7 | metricsEndpoints: 8 | {{ if .ES_SERVER }} 9 | - metrics: [{{.METRICS}}] 10 | alerts: [{{.ALERTS}}] 11 | indexer: 12 | insecureSkipVerify: true 13 | esServers: [{{.ES_SERVER}}] 14 | defaultIndex: {{.ES_INDEX}} 15 | type: opensearch 16 | {{ end }} 17 | {{ if .LOCAL_INDEXING }} 18 | - metrics: [{{.METRICS}}] 19 | alerts: [{{.ALERTS}}] 20 | indexer: 21 | type: local 22 | metricsDirectory: collected-metrics-{{.UUID}} 23 | {{ end }} 24 | 25 | jobs: 26 | 27 | - name: prereqs 28 | jobIterations: 1 29 | namespace: kueue-scale 30 | preLoadImages: false 31 | namespacedIterations: false 32 | cleanup: true 33 | skipIndexing: true 34 | qps: 5 35 | burst: 5 36 | objects: 37 | - objectTemplate: cluster-queue.yml 38 | replicas: 1 39 | inputVars: 40 | PODS_QUOTA: {{.POD_REPLICAS}} 41 | - objectTemplate: resource-flavor.yml 42 | replicas: 1 43 | 44 | - name: kueue-scale-pods 45 | namespace: kueue-scale 46 | jobIterations: {{.ITERATIONS}} 47 | preLoadImages: true 48 | preLoadPeriod: 5s 49 | namespacedIterations: false 50 | cleanup: true 51 | namespaceLabels: 52 | kueue.openshift.io/managed: "true" 53 | qps: {{.QPS}} 54 | burst: {{.BURST}} 55 | objects: 56 | - objectTemplate: local-queue.yml 57 | replicas: 1 58 | - objectTemplate: pod.yml 59 | replicas: {{.POD_REPLICAS}} 60 | inputVars: 61 | runtime: {{.WORKLOAD_RUNTIME}} 62 | -------------------------------------------------------------------------------- /cmd/config/metrics-profiles/kueue-metrics.yml: -------------------------------------------------------------------------------- 1 | # Jobs 2 | 3 | - query: count(kube_job_info{namespace=~"kueue-scale-.+"}) 4 | metricName: totalJobs 5 | 6 | - query: sum(kube_pod_status_phase{namespace=~"kueue-scale-.+"}) by (phase) 7 | metricName: podStatusCount 8 | 9 | # Pod CPU & memory 10 | 11 | - query: avg_over_time(sum(irate(container_cpu_usage_seconds_total{name!="", namespace="openshift-kube-apiserver"}[2m]))[{{.elapsed}}:]) 12 | metricName: cpu-kube-apiserver-avg 13 | instant: true 14 | 15 | - query: avg_over_time(sum(irate(container_cpu_usage_seconds_total{name!="", namespace=~"openshift-kueue-operator|kueue-system"}[2m]))[{{.elapsed}}:]) 16 | metricName: cpu-kueue-avg 17 | instant: true 18 | 19 | - query: avg_over_time(sum(irate(container_cpu_usage_seconds_total{name!="", namespace="openshift-etcd"}[2m]))[{{.elapsed}}:]) 20 | metricName: cpu-etcd-avg 21 | instant: true 22 | 23 | - query: max(max_over_time(sum(container_memory_working_set_bytes{name!="", namespace="openshift-kube-apiserver"})[{{.elapsed}}:])) 24 | metricName: max-memory-kube-apiserver-aggregated 25 | instant: true 26 | 27 | - query: max(max_over_time(sum(container_memory_working_set_bytes{pod=~"kueue-controller-manager-.*", name="", namespace=~"openshift-kueue-operator|kueue-system"})[{{.elapsed}}:])) 28 | metricName: max-memory-kueue-aggregated 29 | 30 | - query: max(max_over_time(sum(container_memory_rss{name!="", namespace="openshift-etcd"})[{{.elapsed}}:])) 31 | metricName: max-memory-etcd-aggregated 32 | instant: true 33 | 34 | # Kueue 35 | 36 | - query: histogram_quantile(0.99, rate(kueue_admission_wait_time_seconds_bucket[2m])) 37 | metricName: P99KueueAdmissionWaitTime 38 | 39 | - query: kueue_build_info 40 | metricName: KueueBuildInfo 41 | instant: true -------------------------------------------------------------------------------- /cmd/config/virt-density/virt-density.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | deletionStrategy: {{.DELETION_STRATEGY}} 6 | measurements: 7 | - name: vmiLatency 8 | thresholds: 9 | - conditionType: VMIRunning 10 | metric: P99 11 | threshold: {{.VMI_RUNNING_THRESHOLD}} 12 | metricsEndpoints: 13 | {{ if .ES_SERVER }} 14 | - metrics: [{{.METRICS}}] 15 | alerts: [{{.ALERTS}}] 16 | indexer: 17 | esServers: ["{{.ES_SERVER}}"] 18 | insecureSkipVerify: true 19 | defaultIndex: {{.ES_INDEX}} 20 | type: opensearch 21 | {{ end }} 22 | {{ if .LOCAL_INDEXING }} 23 | - metrics: [{{.METRICS}}] 24 | alerts: [{{.ALERTS}}] 25 | indexer: 26 | type: local 27 | metricsDirectory: collected-metrics-{{.UUID}} 28 | {{ end }} 29 | jobs: 30 | - name: virt-density 31 | namespace: virt-density 32 | jobIterations: {{.JOB_ITERATIONS}} 33 | qps: {{.QPS}} 34 | burst: {{.BURST}} 35 | namespacedIterations: {{.NAMESPACED_ITERATIONS}} 36 | iterationsPerNamespace: {{.ITERATIONS_PER_NAMESPACE}} 37 | preLoadImages: true 38 | waitWhenFinished: true 39 | churnConfig: 40 | cycles: {{.CHURN_CYCLES}} 41 | duration: {{.CHURN_DURATION}} 42 | percent: {{.CHURN_PERCENT}} 43 | delay: {{.CHURN_DELAY}} 44 | mode: {{.CHURN_MODE}} 45 | namespaceLabels: 46 | security.openshift.io/scc.podSecurityLabelSync: false 47 | pod-security.kubernetes.io/enforce: privileged 48 | pod-security.kubernetes.io/audit: privileged 49 | pod-security.kubernetes.io/warn: privileged 50 | objects: 51 | 52 | - objectTemplate: vm.yml 53 | replicas: 1 54 | inputVars: 55 | vmImage: {{.VM_IMAGE}} 56 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/anp-node-selector-two-worker-group.yml: -------------------------------------------------------------------------------- 1 | apiVersion: policy.networking.k8s.io/v1alpha1 2 | kind: AdminNetworkPolicy 3 | metadata: 4 | name: allow-traffic-egress-node-labeled-ns-to-two-worker-group-p10 5 | spec: 6 | priority: 10 7 | subject: 8 | namespaces: 9 | matchLabels: 10 | tenant: "anp-node" 11 | egress: 12 | - name: "allow egress" 13 | action: "Allow" 14 | to: 15 | - nodes: 16 | matchExpressions: 17 | - key: node-role.kubernetes.io/worker 18 | operator: Exists 19 | ports: 20 | - portNumber: 21 | port: 10256 22 | protocol: TCP 23 | - portNumber: 24 | protocol: TCP 25 | port: 53 26 | - portNumber: 27 | protocol: UDP 28 | port: 53 29 | - portNumber: 30 | port: 8081 31 | protocol: TCP 32 | - portNumber: 33 | port: 9100 34 | protocol: TCP 35 | - portNumber: 36 | port: 8798 37 | protocol: TCP 38 | - portNumber: 39 | port: 8443 40 | protocol: TCP 41 | - portNumber: 42 | port: 8444 43 | protocol: TCP 44 | - portRange: 45 | start: 30001 46 | end: 30003 47 | protocol: TCP 48 | - name: "pass egress" 49 | action: "Pass" 50 | to: 51 | - nodes: 52 | matchExpressions: 53 | - key: node-role.kubernetes.io/worker 54 | operator: Exists 55 | ports: 56 | - portNumber: 57 | port: 10250 58 | protocol: TCP 59 | - portNumber: 60 | port: 9443 61 | protocol: TCP 62 | - name: "deny egress" 63 | action: "Deny" 64 | to: 65 | - nodes: 66 | matchExpressions: 67 | - key: node-role.kubernetes.io/worker 68 | operator: Exists 69 | -------------------------------------------------------------------------------- /cmd/config/virt-udn-density/vm-server.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kubevirt.io/v1 2 | kind: VirtualMachine 3 | metadata: 4 | name: virt-server-{{.Iteration}} 5 | labels: 6 | kubevirt.io/os: fedora 7 | spec: 8 | runStrategy: Always 9 | template: 10 | metadata: 11 | labels: 12 | kubevirt.io/os: fedora 13 | app: nginx 14 | spec: 15 | terminationGracePeriodSeconds: 0 16 | domain: 17 | resources: 18 | requests: 19 | memory: 256Mi 20 | devices: 21 | disks: 22 | - name: containerdisk 23 | disk: 24 | bus: virtio 25 | - disk: 26 | bus: virtio 27 | name: cloudinitdisk 28 | - name: emptydisk 29 | disk: 30 | bus: virtio 31 | interfaces: 32 | - name: primary-udn-net 33 | binding: 34 | name: {{.bindingMethod}} 35 | ports: 36 | - port: 80 37 | networks: 38 | - name: primary-udn-net 39 | pod: {} 40 | volumes: 41 | - name: containerdisk 42 | containerDisk: 43 | image: {{.vmImage}} 44 | imagePullPolicy: IfNotPresent 45 | - name: cloudinitdisk 46 | cloudInitNoCloud: 47 | networkData: | 48 | version: 2 49 | ethernets: 50 | eth0: 51 | dhcp4: true 52 | userData: |- 53 | #cloud-config 54 | password: perfscale 55 | chpasswd: { expire: False } 56 | packages: 57 | - nginx 58 | runcmd: 59 | - systemctl start nginx 60 | - systemctl enable nginx 61 | - name: emptydisk 62 | emptyDisk: 63 | capacity: "50Mi" 64 | -------------------------------------------------------------------------------- /pkg/workloads/crd-scale.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Kube-burner Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package workloads 16 | 17 | import ( 18 | "os" 19 | 20 | "github.com/kube-burner/kube-burner/v2/pkg/workloads" 21 | "github.com/spf13/cobra" 22 | ) 23 | 24 | // NewCrdScale holds the crd-scale workload 25 | func NewCrdScale(wh *workloads.WorkloadHelper) *cobra.Command { 26 | var iterations int 27 | var metricsProfiles []string 28 | var rc int 29 | cmd := &cobra.Command{ 30 | Use: "crd-scale", 31 | Short: "Runs crd-scale workload", 32 | SilenceUsage: true, 33 | Run: func(cmd *cobra.Command, args []string) { 34 | setMetrics(cmd, metricsProfiles) 35 | AdditionalVars["JOB_ITERATIONS"] = iterations 36 | 37 | wh.SetVariables(AdditionalVars, nil) 38 | rc = wh.Run(cmd.Name() + ".yml") 39 | }, 40 | PostRun: func(cmd *cobra.Command, args []string) { 41 | os.Exit(rc) 42 | }, 43 | } 44 | cmd.Flags().IntVar(&iterations, "iterations", 0, "Number of CRDs to create") 45 | cmd.Flags().StringSliceVar(&metricsProfiles, "metrics-profile", []string{"metrics-aggregated.yml"}, "Comma separated list of metrics profiles to use") 46 | cmd.MarkFlagRequired("iterations") 47 | return cmd 48 | } 49 | -------------------------------------------------------------------------------- /cmd/config/udn-density-pods/deployment-server.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Deployment 3 | apiVersion: apps/v1 4 | metadata: 5 | name: server-{{.Replica}} 6 | spec: 7 | replicas: {{.podReplicas}} 8 | selector: 9 | matchLabels: 10 | name: cluster-density-{{.Replica}} 11 | template: 12 | metadata: 13 | labels: 14 | name: cluster-density-{{.Replica}} 15 | app: nginx 16 | spec: 17 | topologySpreadConstraints: 18 | - maxSkew: 1 19 | topologyKey: kubernetes.io/hostname 20 | whenUnsatisfiable: ScheduleAnyway 21 | labelSelector: 22 | matchLabels: 23 | app: nginx 24 | affinity: 25 | nodeAffinity: 26 | requiredDuringSchedulingIgnoredDuringExecution: 27 | nodeSelectorTerms: 28 | - matchExpressions: 29 | - key: node-role.kubernetes.io/worker 30 | operator: Exists 31 | - key: node-role.kubernetes.io/infra 32 | operator: DoesNotExist 33 | - key: node-role.kubernetes.io/workload 34 | operator: DoesNotExist 35 | containers: 36 | - image: quay.io/cloud-bulldozer/nginx:latest 37 | resources: 38 | requests: 39 | memory: "25Mi" 40 | cpu: "25m" 41 | volumeMounts: 42 | - name: podinfo 43 | mountPath: /etc/podlabels 44 | imagePullPolicy: IfNotPresent 45 | ports: 46 | - containerPort: 8080 47 | protocol: TCP 48 | - containerPort: 8443 49 | protocol: TCP 50 | name: cluster-density 51 | volumes: 52 | - name: podinfo 53 | downwardAPI: 54 | items: 55 | - path: "labels" 56 | fieldRef: 57 | fieldPath: metadata.labels 58 | -------------------------------------------------------------------------------- /cmd/config/node-density-heavy/postgres-deployment.yml: -------------------------------------------------------------------------------- 1 | kind: Deployment 2 | apiVersion: apps/v1 3 | metadata: 4 | name: postgres-{{.Replica}}-{{.Iteration}} 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: postgres-{{.Replica}}-{{.Iteration}} 10 | app: postgres 11 | spec: 12 | topologySpreadConstraints: 13 | - maxSkew: 1 14 | topologyKey: kubernetes.io/hostname 15 | whenUnsatisfiable: ScheduleAnyway 16 | labelSelector: 17 | matchLabels: 18 | app: postgres 19 | affinity: 20 | nodeAffinity: 21 | requiredDuringSchedulingIgnoredDuringExecution: 22 | nodeSelectorTerms: 23 | - matchExpressions: 24 | - key: node-role.kubernetes.io/worker 25 | operator: Exists 26 | - key: node-role.kubernetes.io/infra 27 | operator: DoesNotExist 28 | - key: node-role.kubernetes.io/workload 29 | operator: DoesNotExist 30 | containers: 31 | - name: postgresql 32 | image: registry.redhat.io/rhel8/postgresql-10@sha256:4b912c80085b88a03309aeb7907efcc29dd3342fa3952b6ea067afb1914bfe53 33 | ports: 34 | - containerPort: 5432 35 | protocol: TCP 36 | env: 37 | - name: POSTGRESQL_USER 38 | value: admin 39 | - name: POSTGRESQL_PASSWORD 40 | value: secret 41 | - name: POSTGRESQL_DATABASE 42 | value: node-density 43 | imagePullPolicy: IfNotPresent 44 | securityContext: 45 | privileged: false 46 | resources: 47 | requests: 48 | memory: "20Mi" 49 | cpu: "20m" 50 | restartPolicy: Always 51 | replicas: 1 52 | selector: 53 | matchLabels: 54 | name: postgres-{{.Replica}}-{{.Iteration}} 55 | strategy: 56 | type: RollingUpdate 57 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: build lint clean test help all 3 | 4 | 5 | ARCH ?= $(shell uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) 6 | BIN_NAME = kube-burner-ocp 7 | BIN_DIR = bin 8 | BIN_PATH = $(BIN_DIR)/$(ARCH)/$(BIN_NAME) 9 | CGO = 0 10 | TEST_BINARY ?= $(CURDIR)/$(BIN_PATH) 11 | 12 | GIT_COMMIT = $(shell git rev-parse HEAD) 13 | VERSION ?= $(shell hack/tag_name.sh) 14 | SOURCES := $(shell find . -type f -name "*.go") 15 | SOURCES += $(shell find cmd/config/) 16 | BUILD_DATE = $(shell date '+%Y-%m-%d-%H:%M:%S') 17 | VERSION_PKG=github.com/cloud-bulldozer/go-commons/v2/version 18 | 19 | all: lint build 20 | 21 | help: 22 | @echo "Commands for $(BIN_PATH):" 23 | @echo 24 | @echo 'Usage:' 25 | @echo ' make lint Install and execute pre-commit' 26 | @echo ' make clean Clean the compiled binaries' 27 | @echo ' [ARCH=arch] make build Compile the project for arch, default amd64' 28 | @echo ' [ARCH=arch] make install Installs kube-burner binary in the system, default amd64' 29 | @echo ' make help Show this message' 30 | 31 | build: $(BIN_PATH) 32 | 33 | $(BIN_PATH): go.sum $(SOURCES) 34 | @echo -e "\033[2mBuilding $(BIN_PATH)\033[0m" 35 | @echo "GOPATH=$(GOPATH)" 36 | GOARCH=$(ARCH) CGO_ENABLED=$(CGO) go build -v -ldflags "-X $(VERSION_PKG).GitCommit=$(GIT_COMMIT) -X $(VERSION_PKG).BuildDate=$(BUILD_DATE) -X $(VERSION_PKG).Version=$(VERSION)" -o $(BIN_PATH) ./cmd/ 37 | 38 | lint: 39 | @echo "Executing pre-commit for all files" 40 | pre-commit run --all-files 41 | @echo "pre-commit executed." 42 | 43 | clean: 44 | test ! -e $(BIN_DIR) || rm -Rf $(BIN_PATH) 45 | 46 | install: 47 | cp $(BIN_PATH) /usr/bin/$(BIN_NAME) 48 | 49 | test: test-ocp 50 | 51 | test-ocp: 52 | cd test && KUBE_BURNER_OCP=$(TEST_BINARY) bats $(if $(TEST_FILTER),--filter "$(TEST_FILTER)",) -F pretty -T --print-output-on-failure test-ocp.bats 53 | -------------------------------------------------------------------------------- /cmd/config/pvc-density/pvc-density.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | measurements: 5 | - name: podLatency 6 | metricsEndpoints: 7 | {{ if .ES_SERVER }} 8 | - metrics: [{{.METRICS}}] 9 | alerts: [{{.ALERTS}}] 10 | indexer: 11 | esServers: ["{{.ES_SERVER}}"] 12 | insecureSkipVerify: true 13 | defaultIndex: {{.ES_INDEX}} 14 | type: opensearch 15 | {{ end }} 16 | {{ if .LOCAL_INDEXING }} 17 | - metrics: [{{.METRICS}}] 18 | alerts: [{{.ALERTS}}] 19 | indexer: 20 | type: local 21 | metricsDirectory: collected-metrics-{{.UUID}} 22 | {{ end }} 23 | 24 | jobs: 25 | - name: add-default-storage 26 | namespace: pvc-density 27 | jobIterations: 1 28 | namespacedIterations: false 29 | podWait: false 30 | waitWhenFinished: true 31 | skipIndexing: true 32 | namespaceLabels: 33 | security.openshift.io/scc.podSecurityLabelSync: false 34 | pod-security.kubernetes.io/enforce: privileged 35 | pod-security.kubernetes.io/audit: privileged 36 | pod-security.kubernetes.io/warn: privileged 37 | objects: 38 | 39 | - name: pvc-density 40 | namespace: pvc-density 41 | jobIterations: {{.JOB_ITERATIONS}} 42 | cleanup: true 43 | namespacedIterations: false 44 | podWait: false 45 | waitWhenFinished: true 46 | preLoadImages: true 47 | preLoadPeriod: 10s 48 | namespaceLabels: 49 | security.openshift.io/scc.podSecurityLabelSync: false 50 | pod-security.kubernetes.io/enforce: privileged 51 | pod-security.kubernetes.io/audit: privileged 52 | pod-security.kubernetes.io/warn: privileged 53 | objects: 54 | 55 | - objectTemplate: pvc.yml 56 | replicas: 1 57 | inputVars: 58 | claimSize: {{.CLAIM_SIZE}} 59 | storageClassName: {{.STORAGE_CLASS_NAME}} 60 | 61 | - objectTemplate: pod.yml 62 | replicas: 1 63 | inputVars: 64 | containerImage: registry.k8s.io/pause:3.1 65 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/postgres-deployment.yml: -------------------------------------------------------------------------------- 1 | kind: Deployment 2 | apiVersion: apps/v1 3 | metadata: 4 | name: anp-db-{{.Iteration}}-{{.Replica}} 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: postgres-{{.Iteration}}-{{.Replica}} 10 | type: perfdb-{{.Iteration}}-{{.Replica}} 11 | trafficapp: "perfdb" 12 | tenant: {{.tenant}} 13 | spec: 14 | affinity: 15 | nodeAffinity: 16 | requiredDuringSchedulingIgnoredDuringExecution: 17 | nodeSelectorTerms: 18 | - matchExpressions: 19 | - key: node-role.kubernetes.io/worker 20 | operator: Exists 21 | - key: node-role.kubernetes.io/infra 22 | operator: DoesNotExist 23 | - key: node-role.kubernetes.io/workload 24 | operator: DoesNotExist 25 | containers: 26 | - name: postgresql 27 | image: registry.redhat.io/rhel8/postgresql-10@sha256:4b912c80085b88a03309aeb7907efcc29dd3342fa3952b6ea067afb1914bfe53 28 | readinessProbe: 29 | tcpSocket: 30 | port: 5432 31 | periodSeconds: 10 32 | failureThreshold: 1 33 | timeoutSeconds: 10 34 | initialDelaySeconds: 3 35 | ports: 36 | - containerPort: 5432 37 | protocol: TCP 38 | env: 39 | - name: POSTGRESQL_USER 40 | value: admin 41 | - name: POSTGRESQL_PASSWORD 42 | value: secret 43 | - name: POSTGRESQL_DATABASE 44 | value: node-density 45 | imagePullPolicy: IfNotPresent 46 | securityContext: 47 | privileged: false 48 | resources: 49 | requests: 50 | memory: "20Mi" 51 | cpu: "20m" 52 | restartPolicy: Always 53 | replicas: {{.podReplicas}} 54 | selector: 55 | matchLabels: 56 | name: postgres-{{.Iteration}}-{{.Replica}} 57 | strategy: 58 | type: RollingUpdate 59 | -------------------------------------------------------------------------------- /cmd/config/node-density-cni/curl-deployment.yml: -------------------------------------------------------------------------------- 1 | kind: Deployment 2 | apiVersion: apps/v1 3 | metadata: 4 | name: curl-{{.Replica}}-{{.Iteration}} 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: curl-{{.Replica}}-{{.Iteration}} 10 | app: curl 11 | spec: 12 | topologySpreadConstraints: 13 | - maxSkew: 1 14 | topologyKey: kubernetes.io/hostname 15 | whenUnsatisfiable: ScheduleAnyway 16 | labelSelector: 17 | matchLabels: 18 | app: curl 19 | affinity: 20 | nodeAffinity: 21 | requiredDuringSchedulingIgnoredDuringExecution: 22 | nodeSelectorTerms: 23 | - matchExpressions: 24 | - key: node-role.kubernetes.io/worker 25 | operator: Exists 26 | - key: node-role.kubernetes.io/infra 27 | operator: DoesNotExist 28 | - key: node-role.kubernetes.io/workload 29 | operator: DoesNotExist 30 | containers: 31 | - name: curlapp 32 | image: quay.io/cloud-bulldozer/curl:latest 33 | command: ["sleep", "inf"] 34 | resources: 35 | requests: 36 | memory: "10Mi" 37 | cpu: "10m" 38 | env: 39 | - name: WEBSERVER_HOSTNAME 40 | value: webserver-{{.Replica}}-{{.Iteration}} 41 | - name: WEBSERVER_PORT 42 | value: "8080" 43 | imagePullPolicy: IfNotPresent 44 | securityContext: 45 | privileged: false 46 | startupProbe: 47 | exec: 48 | command: 49 | - "/bin/sh" 50 | - "-c" 51 | - "curl --fail -sS ${WEBSERVER_HOSTNAME}:${WEBSERVER_PORT} -o /dev/null" 52 | periodSeconds: 1 53 | timeoutSeconds: 1 54 | failureThreshold: 600 55 | restartPolicy: Always 56 | replicas: 1 57 | selector: 58 | matchLabels: 59 | name: curl-{{.Replica}}-{{.Iteration}} 60 | strategy: 61 | type: RollingUpdate 62 | -------------------------------------------------------------------------------- /cmd/config/web-burner-cluster-density/cluster_density_pod_service_ports.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: served-ns-{{ .ns }}-{{ .Replica }} 6 | labels: 7 | app: app-served-{{ .ns }} 8 | spec: 9 | ports: 10 | - name: served-ns-{{ .ns }}-{{ .Replica }}-1 11 | port: 8080 12 | protocol: TCP 13 | targetPort: 8080 14 | - name: served-ns-{{ .ns }}-{{ .Replica }}-2 15 | port: 8081 16 | protocol: TCP 17 | targetPort: 8081 18 | - name: served-ns-{{ .ns }}-{{ .Replica }}-3 19 | port: 8082 20 | protocol: TCP 21 | targetPort: 8082 22 | - name: served-ns-{{ .ns }}-{{ .Replica }}-4 23 | port: 8083 24 | protocol: TCP 25 | targetPort: 8083 26 | - name: served-ns-{{ .ns }}-{{ .Replica }}-5 27 | port: 8084 28 | protocol: TCP 29 | targetPort: 8084 30 | - name: served-ns-{{ .ns }}-{{ .Replica }}-6 31 | port: 8085 32 | protocol: TCP 33 | targetPort: 8085 34 | - name: served-ns-{{ .ns }}-{{ .Replica }}-7 35 | port: 8086 36 | protocol: TCP 37 | targetPort: 8086 38 | - name: served-ns-{{ .ns }}-{{ .Replica }}-8 39 | port: 8087 40 | protocol: TCP 41 | targetPort: 8087 42 | - name: served-ns-{{ .ns }}-{{ .Replica }}-9 43 | port: 8088 44 | protocol: TCP 45 | targetPort: 8088 46 | - name: served-ns-{{ .ns }}-{{ .Replica }}-10 47 | port: 8089 48 | protocol: TCP 49 | targetPort: 8089 50 | - name: served-ns-{{ .ns }}-{{ .Replica }}-11 51 | port: 8090 52 | protocol: TCP 53 | targetPort: 8090 54 | - name: served-ns-{{ .ns }}-{{ .Replica }}-12 55 | port: 8091 56 | protocol: TCP 57 | targetPort: 8091 58 | - name: served-ns-{{ .ns }}-{{ .Replica }}-13 59 | port: 8092 60 | protocol: TCP 61 | targetPort: 8092 62 | - name: served-ns-{{ .ns }}-{{ .Replica }}-14 63 | port: 8093 64 | protocol: TCP 65 | targetPort: 8093 66 | - name: served-ns-{{ .ns }}-{{ .Replica }}-15 67 | port: 8094 68 | protocol: TCP 69 | targetPort: 8094 70 | selector: 71 | app: app-served-{{ .ns }} 72 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-ms/cluster-density-ms.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | deletionStrategy: {{.DELETION_STRATEGY}} 6 | measurements: 7 | - name: podLatency 8 | thresholds: 9 | - conditionType: Ready 10 | metric: P99 11 | threshold: {{.POD_READY_THRESHOLD}} 12 | metricsEndpoints: 13 | {{ if .ES_SERVER }} 14 | - metrics: [{{.METRICS}}] 15 | alerts: [{{.ALERTS}}] 16 | indexer: 17 | esServers: ["{{.ES_SERVER}}"] 18 | insecureSkipVerify: true 19 | defaultIndex: {{.ES_INDEX}} 20 | type: opensearch 21 | {{ end }} 22 | {{ if .LOCAL_INDEXING }} 23 | - metrics: [{{.METRICS}}] 24 | alerts: [{{.ALERTS}}] 25 | indexer: 26 | type: local 27 | metricsDirectory: collected-metrics-{{.UUID}} 28 | {{ end }} 29 | 30 | jobs: 31 | - name: cluster-density-ms 32 | namespace: cluster-density-ms 33 | jobIterations: {{.JOB_ITERATIONS}} 34 | qps: {{.QPS}} 35 | burst: {{.BURST}} 36 | namespacedIterations: true 37 | podWait: false 38 | waitWhenFinished: true 39 | preLoadImages: true 40 | preLoadPeriod: 10s 41 | churnConfig: 42 | cycles: {{.CHURN_CYCLES}} 43 | duration: {{.CHURN_DURATION}} 44 | percent: {{.CHURN_PERCENT}} 45 | delay: {{.CHURN_DELAY}} 46 | mode: {{.CHURN_MODE}} 47 | namespaceLabels: 48 | security.openshift.io/scc.podSecurityLabelSync: false 49 | pod-security.kubernetes.io/enforce: privileged 50 | pod-security.kubernetes.io/audit: privileged 51 | pod-security.kubernetes.io/warn: privileged 52 | objects: 53 | 54 | - objectTemplate: imagestream.yml 55 | replicas: 1 56 | 57 | - objectTemplate: service.yml 58 | replicas: 2 59 | 60 | - objectTemplate: route.yml 61 | replicas: 1 62 | 63 | - objectTemplate: secret.yml 64 | replicas: 20 65 | 66 | - objectTemplate: configmap.yml 67 | replicas: 10 68 | 69 | - objectTemplate: deployment.yml 70 | replicas: 4 71 | inputVars: 72 | podReplicas: 2 73 | -------------------------------------------------------------------------------- /cmd/config/egressip/deployment-client.yml: -------------------------------------------------------------------------------- 1 | kind: Deployment 2 | apiVersion: apps/v1 3 | metadata: 4 | name: client-{{.Replica}}-{{.Iteration}} 5 | spec: 6 | replicas: {{.podReplicas}} 7 | selector: 8 | matchLabels: 9 | name: client-{{.Replica}}-{{.Iteration}} 10 | template: 11 | metadata: 12 | labels: 13 | name: client-{{.Replica}}-{{.Iteration}} 14 | app: client 15 | spec: 16 | topologySpreadConstraints: 17 | - maxSkew: 1 18 | topologyKey: kubernetes.io/hostname 19 | whenUnsatisfiable: ScheduleAnyway 20 | labelSelector: 21 | matchLabels: 22 | app: client 23 | affinity: 24 | nodeAffinity: 25 | requiredDuringSchedulingIgnoredDuringExecution: 26 | nodeSelectorTerms: 27 | - matchExpressions: 28 | - key: node-role.kubernetes.io/worker 29 | operator: Exists 30 | - key: node-role.kubernetes.io/infra 31 | operator: DoesNotExist 32 | - key: node-role.kubernetes.io/workload 33 | operator: DoesNotExist 34 | containers: 35 | - name: client-app 36 | image: quay.io/cloud-bulldozer/eipvalidator:latest 37 | resources: 38 | requests: 39 | memory: "10Mi" 40 | cpu: "10m" 41 | ports: 42 | - containerPort: 8080 43 | name: metrics 44 | env: 45 | - name: EXT_SERVER_HOST 46 | value: "{{.extServerHost}}" 47 | - name: EXT_SERVER_PORT 48 | value: "{{ add 9002 (mod .Iteration 60) }}" 49 | - name: EGRESS_IPS 50 | {{- $eips := (splitList " " (GetIPAddress .eipAddresses .Iteration .addrPerIteration) | join ",") }} 51 | value: "{{$eips}}" 52 | - name: DELAY_BETWEEN_REQ_SEC 53 | value: "1" 54 | - name: REQ_TIMEOUT_SEC 55 | value: "3" 56 | imagePullPolicy: IfNotPresent 57 | securityContext: 58 | privileged: false 59 | volumeMounts: 60 | restartPolicy: Always 61 | strategy: 62 | type: RollingUpdate 63 | 64 | -------------------------------------------------------------------------------- /cmd/config/udn-density-pods/deployment-client.yml: -------------------------------------------------------------------------------- 1 | kind: Deployment 2 | apiVersion: apps/v1 3 | metadata: 4 | name: client-{{.Replica}} 5 | spec: 6 | replicas: {{.podReplicas}} 7 | selector: 8 | matchLabels: 9 | name: client-{{.Replica}} 10 | template: 11 | metadata: 12 | labels: 13 | name: client-{{.Replica}} 14 | app: client 15 | spec: 16 | topologySpreadConstraints: 17 | - maxSkew: 1 18 | topologyKey: kubernetes.io/hostname 19 | whenUnsatisfiable: ScheduleAnyway 20 | labelSelector: 21 | matchLabels: 22 | app: client 23 | affinity: 24 | nodeAffinity: 25 | requiredDuringSchedulingIgnoredDuringExecution: 26 | nodeSelectorTerms: 27 | - matchExpressions: 28 | - key: node-role.kubernetes.io/worker 29 | operator: Exists 30 | - key: node-role.kubernetes.io/infra 31 | operator: DoesNotExist 32 | - key: node-role.kubernetes.io/workload 33 | operator: DoesNotExist 34 | containers: 35 | - name: client-app 36 | image: quay.io/cloud-bulldozer/curl:latest 37 | command: ["sleep", "inf"] 38 | resources: 39 | requests: 40 | memory: "10Mi" 41 | cpu: "10m" 42 | env: 43 | - name: SERVICE_ENDPOINT 44 | value: "http://udn-density-{{randInt 1 6}}/256.html" 45 | imagePullPolicy: IfNotPresent 46 | {{ if not .simple }} 47 | readinessProbe: 48 | exec: 49 | command: 50 | - "/bin/sh" 51 | - "-c" 52 | - "curl --fail -sS ${SERVICE_ENDPOINT} -o /dev/null" 53 | {{ end }} 54 | securityContext: 55 | privileged: false 56 | volumeMounts: 57 | - name: podinfo 58 | mountPath: /etc/podlabels 59 | volumes: 60 | - name: podinfo 61 | downwardAPI: 62 | items: 63 | - path: "labels" 64 | fieldRef: 65 | fieldPath: metadata.labels 66 | restartPolicy: Always 67 | strategy: 68 | type: RollingUpdate 69 | -------------------------------------------------------------------------------- /cmd/config/virt-ephemeral-restart/templates/vm.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kubevirt.io/v1 2 | kind: VirtualMachine 3 | metadata: 4 | name: "{{ .vmName }}-{{ .Iteration }}-{{ .Replica }}" 5 | labels: 6 | virt-ephemeral-restart.kube-burner.io/group: "group-{{ .Iteration }}" 7 | spec: 8 | dataVolumeTemplates: 9 | - metadata: 10 | name: "{{ .vmName }}-root-{{ .Iteration }}-{{ .Replica }}" 11 | spec: 12 | {{ if .rootdiskVolumeSource }} 13 | source: {{ .rootdiskVolumeSource | mustToJson }} 14 | {{ end }} 15 | {{ if .rootdiskVolumeSourceRef }} 16 | sourceRef: {{ .rootdiskVolumeSourceRef | mustToJson }} 17 | {{ end }} 18 | storage: 19 | accessModes: 20 | - {{ .accessMode }} 21 | storageClassName: {{ .storageClassName }} 22 | resources: 23 | requests: 24 | storage: {{ default "6Gi" .rootVolumeSize }} 25 | runStrategy: RerunOnFailure 26 | template: 27 | spec: 28 | accessCredentials: 29 | - sshPublicKey: 30 | propagationMethod: 31 | noCloud: {} 32 | source: 33 | secret: 34 | secretName: {{ .sshPublicKeySecret }} 35 | architecture: amd64 36 | domain: 37 | resources: 38 | requests: 39 | memory: {{ default "512Mi" .vmMemory }} 40 | devices: 41 | disks: 42 | - disk: 43 | bus: virtio 44 | name: rootdisk 45 | bootOrder: 1 46 | - disk: 47 | bus: virtio 48 | name: cloudinitdisk 49 | interfaces: 50 | - name: default 51 | masquerade: {} 52 | bootOrder: 2 53 | machine: 54 | type: pc-q35-rhel9.4.0 55 | networks: 56 | - name: default 57 | pod: {} 58 | volumes: 59 | - dataVolume: 60 | name: "{{ .vmName }}-root-{{ .Iteration }}-{{ .Replica }}" 61 | name: rootdisk 62 | - cloudInitNoCloud: 63 | userData: | 64 | #cloud-config 65 | chpasswd: 66 | expire: false 67 | password: {{ uuidv4 }} 68 | user: fedora 69 | runcmd: [] 70 | name: cloudinitdisk 71 | -------------------------------------------------------------------------------- /.github/workflows/test-ocp.yml: -------------------------------------------------------------------------------- 1 | name: Execute tests on OCP 2 | on: 3 | workflow_dispatch: 4 | workflow_call: 5 | secrets: 6 | OPENSHIFT_SERVER: 7 | required: true 8 | OPENSHIFT_USER: 9 | required: true 10 | OPENSHIFT_PASSWORD: 11 | required: true 12 | jobs: 13 | ocp-e2e-ci: 14 | runs-on: ubuntu-latest 15 | concurrency: 16 | group: ocp-e2e-ci 17 | steps: 18 | 19 | - name: Check out code 20 | uses: actions/checkout@v4 21 | with: 22 | fetch-depth: 1 23 | ref: ${{ github.event.pull_request.head.sha }} 24 | persist-credentials: false 25 | 26 | - name: Download kube-burner-ocp binary 27 | uses: actions/download-artifact@v4 28 | with: 29 | name: kube-burner-ocp 30 | path: /tmp/ 31 | 32 | - name: Install bats 33 | uses: bats-core/bats-action@1.5.4 34 | with: 35 | bats-version: 1.10.0 36 | support-install: false 37 | assert-install: false 38 | detik-install: false 39 | file-install: false 40 | 41 | - name: Install oc 42 | uses: redhat-actions/oc-installer@v1 43 | 44 | - name: Authenticate against OCP cluster 45 | run: oc login -u ${OPENSHIFT_USER} -p ${OPENSHIFT_PASSWORD} ${OPENSHIFT_SERVER} --insecure-skip-tls-verify=true 46 | env: 47 | OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }} 48 | OPENSHIFT_USER: ${{ secrets.OPENSHIFT_USER }} 49 | OPENSHIFT_PASSWORD: ${{ secrets.OPENSHIFT_PASSWORD }} 50 | 51 | - name: Install Virtctl 52 | run: | 53 | KUBEVIRT_VERSION=$(gh release view --repo kubevirt/kubevirt --json tagName -q '.tagName') 54 | wget https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/virtctl-${KUBEVIRT_VERSION}-linux-amd64 -O /tmp/virtctl 55 | chmod +x /tmp/virtctl 56 | env: 57 | GH_TOKEN: ${{ github.token }} 58 | 59 | - name: Execute Tests 60 | run: | 61 | export PATH=${PATH}:/tmp/ 62 | chmod +x /tmp/kube-burner-ocp 63 | make test-ocp 64 | env: 65 | TERM: linux 66 | PERFSCALE_PROD_ES_SERVER: ${{ secrets.PERFSCALE_PROD_ES_SERVER }} 67 | TEST_BINARY: "/tmp/kube-burner-ocp" 68 | -------------------------------------------------------------------------------- /cmd/config/egressip/egressip.yml: -------------------------------------------------------------------------------- 1 | # This workload has special hardware requirements. 2 | # In order to meet those requirements we have added CI tests in e2e-benchmarking: 3 | # https://github.com/openshift/release/tree/master/ci-operator/step-registry/cloud-bulldozer/e2e-benchmarking 4 | --- 5 | global: 6 | gc: {{.GC}} 7 | gcMetrics: {{.GC_METRICS}} 8 | measurements: 9 | - name: podLatency 10 | thresholds: 11 | - conditionType: Ready 12 | metric: P99 13 | threshold: 15s 14 | metricsEndpoints: 15 | {{ if .ES_SERVER }} 16 | - indexer: 17 | esServers: ["{{.ES_SERVER}}"] 18 | insecureSkipVerify: true 19 | defaultIndex: {{.ES_INDEX}} 20 | type: opensearch 21 | {{ end }} 22 | {{ if .LOCAL_INDEXING }} 23 | - indexer: 24 | type: local 25 | metricsDirectory: collected-metrics-{{.UUID}} 26 | {{ end }} 27 | 28 | jobs: 29 | - name: egressip 30 | namespace: egressip 31 | jobIterations: {{.JOB_ITERATIONS}} 32 | qps: {{.QPS}} 33 | burst: {{.BURST}} 34 | namespacedIterations: true 35 | podWait: false 36 | waitWhenFinished: true 37 | preLoadImages: false 38 | preLoadPeriod: 15s 39 | namespaceLabels: 40 | security.openshift.io/scc.podSecurityLabelSync: false 41 | pod-security.kubernetes.io/enforce: privileged 42 | pod-security.kubernetes.io/audit: privileged 43 | pod-security.kubernetes.io/warn: privileged 44 | openshift.io/cluster-monitoring: true 45 | objects: 46 | 47 | - objectTemplate: prometheus_role.yml 48 | replicas: 1 49 | 50 | - objectTemplate: prometheus_role_binding.yml 51 | replicas: 1 52 | 53 | - objectTemplate: pod_monitor.yml 54 | replicas: 1 55 | 56 | - objectTemplate: egressip-obj.yml 57 | replicas: 1 58 | inputVars: 59 | eipAddresses: {{.EIP_ADDRESSES}} 60 | addrPerIteration: {{.ADDRESSES_PER_ITERATION}} 61 | 62 | - objectTemplate: deployment-client.yml 63 | replicas: 1 64 | inputVars: 65 | podReplicas: 2 66 | eipAddresses: {{.EIP_ADDRESSES}} 67 | addrPerIteration: {{.ADDRESSES_PER_ITERATION}} 68 | extServerHost: {{.EXTERNAL_SERVER_IP}} 69 | -------------------------------------------------------------------------------- /pkg/workloads/udn-bgp.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Kube-burner Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package workloads 16 | 17 | import ( 18 | "fmt" 19 | "os" 20 | 21 | kubeburnermeasurements "github.com/kube-burner/kube-burner/v2/pkg/measurements" 22 | "github.com/kube-burner/kube-burner/v2/pkg/workloads" 23 | "github.com/spf13/cobra" 24 | 25 | "github.com/kube-burner/kube-burner-ocp/pkg/measurements" 26 | ) 27 | 28 | var additionalMeasurementFactoryMap = map[string]kubeburnermeasurements.NewMeasurementFactory{ 29 | "raLatency": measurements.NewRaLatencyMeasurementFactory, 30 | } 31 | 32 | // NewUdnBgp holds udn-bgp workload 33 | func NewUdnBgp(wh *workloads.WorkloadHelper, variant string) *cobra.Command { 34 | var iterations, namespacePerCudn int 35 | var metricsProfiles []string 36 | var rc int 37 | cmd := &cobra.Command{ 38 | Use: variant, 39 | Short: fmt.Sprintf("Runs %v workload", variant), 40 | Run: func(cmd *cobra.Command, args []string) { 41 | setMetrics(cmd, metricsProfiles) 42 | AdditionalVars["JOB_ITERATIONS"] = iterations 43 | AdditionalVars["NAMESPACES_PER_CUDN"] = namespacePerCudn 44 | wh.SetMeasurements(additionalMeasurementFactoryMap) 45 | wh.SetVariables(AdditionalVars, nil) 46 | rc = wh.Run(cmd.Name() + ".yml") 47 | }, 48 | PostRun: func(cmd *cobra.Command, args []string) { 49 | os.Exit(rc) 50 | }, 51 | } 52 | cmd.Flags().IntVar(&iterations, "iterations", 10, fmt.Sprintf("%v iterations", variant)) 53 | cmd.Flags().IntVar(&namespacePerCudn, "namespaces-per-cudn", 1, "Number of namespaces sharing the same cluster udn") 54 | cmd.Flags().StringSliceVar(&metricsProfiles, "metrics-profile", []string{"metrics.yml"}, "Comma separated list of metrics profiles to use") 55 | return cmd 56 | } 57 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | docs_dir: docs/ 2 | repo_url: https://github.com/kube-burner/kube-burner-ocp 3 | nav: 4 | - OpenShift: index.md 5 | site_name: Kube-burner-ocp 6 | plugins: 7 | - search 8 | - include-markdown 9 | extra: 10 | version: 11 | provider: mike 12 | limit: 3 13 | extra_css: 14 | - css/extra.css 15 | theme: 16 | version: latest 17 | name: material 18 | font: 19 | text: Roboto 20 | code: Roboto Mono 21 | palette: 22 | # Palette toggle for light mode 23 | - scheme: default 24 | media: "(prefers-color-scheme: light)" 25 | primary: indigo 26 | toggle: 27 | icon: material/weather-night 28 | name: Switch to dark mode 29 | # Palette toggle for dark mode 30 | - scheme: slate 31 | media: "(prefers-color-scheme: dark)" 32 | primary: indigo 33 | toggle: 34 | icon: material/weather-sunny 35 | 36 | logo: media/logo/kube-burner-logo-mini.png 37 | favicon: media/logo/kube-burner-logo-mini.png 38 | features: 39 | - navigation.instant 40 | - navigation.tracking 41 | - navigation.indexes 42 | - navigation.top 43 | - navigation.footer 44 | - toc.integrate 45 | - search.suggest 46 | - search.highlight 47 | - search.share 48 | - content.code.copy 49 | icon: 50 | repo: fontawesome/brands/github 51 | markdown_extensions: 52 | # Python Markdown 53 | - abbr 54 | - admonition 55 | - attr_list 56 | - def_list 57 | - footnotes 58 | - md_in_html 59 | - toc: 60 | permalink: true 61 | 62 | # Python Markdown Extensions 63 | - pymdownx.arithmatex: 64 | generic: true 65 | - pymdownx.betterem: 66 | smart_enable: all 67 | - pymdownx.caret 68 | - pymdownx.details 69 | - pymdownx.emoji: 70 | emoji_index: !!python/name:materialx.emoji.twemoji 71 | emoji_generator: !!python/name:materialx.emoji.to_svg 72 | - pymdownx.highlight 73 | - pymdownx.inlinehilite 74 | - pymdownx.keys 75 | - pymdownx.mark 76 | - pymdownx.smartsymbols 77 | - pymdownx.superfences: 78 | custom_fences: 79 | - name: mermaid 80 | class: mermaid 81 | format: !!python/name:pymdownx.superfences.fence_code_format 82 | - pymdownx.tabbed: 83 | alternate_style: true 84 | - pymdownx.tasklist: 85 | custom_checkbox: true 86 | - pymdownx.tilde 87 | -------------------------------------------------------------------------------- /pkg/workloads/whereabouts.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Kube-burner Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package workloads 16 | 17 | import ( 18 | "os" 19 | "time" 20 | 21 | "github.com/kube-burner/kube-burner/v2/pkg/workloads" 22 | 23 | "github.com/spf13/cobra" 24 | ) 25 | 26 | // NewWhereabouts 27 | func NewWhereabouts(wh *workloads.WorkloadHelper) *cobra.Command { 28 | var iterations int 29 | var fast bool 30 | var podReadyThreshold time.Duration 31 | var containerImage string 32 | var metricsProfiles []string 33 | var rc int 34 | cmd := &cobra.Command{ 35 | Use: "whereabouts", 36 | Short: "Runs whereabouts workload", 37 | SilenceUsage: true, 38 | Run: func(cmd *cobra.Command, args []string) { 39 | AdditionalVars["JOB_ITERATIONS"] = iterations 40 | AdditionalVars["POD_READY_THRESHOLD"] = podReadyThreshold 41 | AdditionalVars["CONTAINER_IMAGE"] = containerImage 42 | AdditionalVars["FAST"] = fast 43 | setMetrics(cmd, metricsProfiles) 44 | wh.SetVariables(AdditionalVars, nil) 45 | rc = wh.Run(cmd.Name() + ".yml") 46 | }, 47 | PostRun: func(cmd *cobra.Command, args []string) { 48 | os.Exit(rc) 49 | }, 50 | } 51 | cmd.Flags().IntVar(&iterations, "iterations", 10, "Number of iterations - each iteration is 1 ns and 6 pods") 52 | cmd.Flags().BoolVar(&fast, "fast", false, "Use Fast IPAM") 53 | cmd.Flags().DurationVar(&podReadyThreshold, "pod-ready-threshold", 15*time.Second, "Pod ready timeout threshold") 54 | cmd.Flags().StringVar(&containerImage, "container-image", "gcr.io/google_containers/pause:3.1", "Container image") 55 | cmd.Flags().StringSliceVar(&metricsProfiles, "metrics-profile", []string{"metrics-aggregated.yml"}, "Comma separated list of metrics profiles to use") 56 | return cmd 57 | } 58 | -------------------------------------------------------------------------------- /pkg/workloads/pvc-density.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Kube-burner Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package workloads 16 | 17 | import ( 18 | "fmt" 19 | "os" 20 | 21 | "github.com/kube-burner/kube-burner/v2/pkg/workloads" 22 | "github.com/spf13/cobra" 23 | ) 24 | 25 | // NewPVCDensity holds pvc-density workload 26 | func NewPVCDensity(wh *workloads.WorkloadHelper) *cobra.Command { 27 | 28 | var iterations int 29 | var metricsProfiles []string 30 | var claimSize string 31 | var containerImage, storageClassName string 32 | var rc int 33 | 34 | cmd := &cobra.Command{ 35 | Use: "pvc-density", 36 | Short: "Runs pvc-density workload", 37 | SilenceUsage: true, 38 | Run: func(cmd *cobra.Command, args []string) { 39 | AdditionalVars["JOB_ITERATIONS"] = iterations 40 | AdditionalVars["CONTAINER_IMAGE"] = containerImage 41 | AdditionalVars["CLAIM_SIZE"] = claimSize 42 | AdditionalVars["STORAGE_CLASS_NAME"] = storageClassName 43 | 44 | setMetrics(cmd, metricsProfiles) 45 | wh.SetVariables(AdditionalVars, nil) 46 | rc = wh.Run(cmd.Name() + ".yml") 47 | }, 48 | PostRun: func(cmd *cobra.Command, args []string) { 49 | os.Exit(rc) 50 | }, 51 | } 52 | cmd.Flags().StringVar(&storageClassName, "storage-class-name", "", "Storage class name, leave this empty to use the default one") 53 | cmd.Flags().IntVar(&iterations, "iterations", 0, fmt.Sprintf("%v iterations", iterations)) 54 | cmd.Flags().StringVar(&claimSize, "claim-size", "256Mi", "claim-size=256Mi") 55 | cmd.Flags().StringVar(&containerImage, "container-image", "gcr.io/google_containers/pause:3.1", "Container image") 56 | cmd.Flags().StringSliceVar(&metricsProfiles, "metrics-profile", []string{"metrics.yml"}, "Comma separated list of metrics profiles to use") 57 | return cmd 58 | } 59 | -------------------------------------------------------------------------------- /cmd/config/node-scale/node-scale.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | deletionStrategy: {{.DELETION_STRATEGY}} 6 | measurements: 7 | - name: podLatency 8 | thresholds: 9 | - conditionType: Ready 10 | metric: P99 11 | threshold: {{.POD_READY_THRESHOLD}} 12 | metricsEndpoints: 13 | {{ if .ES_SERVER }} 14 | - metrics: [{{.METRICS}}] 15 | alerts: [{{.ALERTS}}] 16 | indexer: 17 | esServers: ["{{.ES_SERVER}}"] 18 | insecureSkipVerify: true 19 | defaultIndex: {{.ES_INDEX}} 20 | type: opensearch 21 | {{ end }} 22 | {{ if .LOCAL_INDEXING }} 23 | - metrics: [{{.METRICS}}] 24 | alerts: [{{.ALERTS}}] 25 | indexer: 26 | type: local 27 | metricsDirectory: collected-metrics-{{.UUID}} 28 | {{ end }} 29 | 30 | jobs: 31 | 32 | - name: pre-reqs 33 | jobType: create 34 | jobIterations: 1 35 | qps: {{ .QPS }} 36 | burst: {{ .BURST }} 37 | cleanup: false 38 | podWait: false 39 | waitWhenFinished: false 40 | verifyObjects: true 41 | errorOnVerify: true 42 | jobIterationDelay: 0s 43 | jobPause: 0s 44 | preLoadImages: false 45 | skipIndexing: true 46 | objects: 47 | - objectTemplate: namespace.yml 48 | replicas: 1 49 | - objectTemplate: rolebinding.yml 50 | replicas: 1 51 | - objectTemplate: secret-kubeconfig.yml 52 | replicas: 1 53 | 54 | - name: node-scale 55 | namespace: kubemark 56 | jobIterations: {{.JOB_ITERATIONS}} 57 | qps: {{.QPS}} 58 | burst: {{.BURST}} 59 | churnConfig: 60 | cycles: {{.CHURN_CYCLES}} 61 | duration: {{.CHURN_DURATION}} 62 | percent: {{.CHURN_PERCENT}} 63 | delay: {{.CHURN_DELAY}} 64 | mode: {{.CHURN_MODE}} 65 | podWait: false 66 | waitWhenFinished: true 67 | preLoadImages: true 68 | preLoadPeriod: 10s 69 | namespaceLabels: 70 | security.openshift.io/scc.podSecurityLabelSync: false 71 | pod-security.kubernetes.io/enforce: privileged 72 | pod-security.kubernetes.io/audit: privileged 73 | pod-security.kubernetes.io/warn: privileged 74 | objects: 75 | - objectTemplate: pod.yml 76 | replicas: 1 77 | inputVars: 78 | cpu: {{ .CPU }} 79 | maxPods: {{ .MAX_PODS }} 80 | memory: {{ .MEMORY }} 81 | tag: {{ .TAG }} -------------------------------------------------------------------------------- /cmd/config/node-density/node-density.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | deletionStrategy: {{.DELETION_STRATEGY}} 6 | measurements: 7 | - name: podLatency 8 | thresholds: 9 | - conditionType: Ready 10 | metric: P99 11 | threshold: {{.POD_READY_THRESHOLD}} 12 | {{ if .PPROF }} 13 | - name: pprof 14 | pprofInterval: 2m 15 | pprofDirectory: pprof-data 16 | pprofTargets: 17 | - name: ovnkube-controller 18 | namespace: "openshift-ovn-kubernetes" 19 | labelSelector: {app: ovnkube-node} 20 | url: http://localhost:29103/debug/pprof/profile?seconds=30 21 | - name: ovnk-control-plane 22 | namespace: "openshift-ovn-kubernetes" 23 | labelSelector: {app: ovnkube-control-plane} 24 | url: http://localhost:29108/debug/pprof/profile?seconds=30 25 | {{ end }} 26 | metricsEndpoints: 27 | {{ if .ES_SERVER }} 28 | - metrics: [{{.METRICS}}] 29 | alerts: [{{.ALERTS}}] 30 | indexer: 31 | esServers: ["{{.ES_SERVER}}"] 32 | insecureSkipVerify: true 33 | defaultIndex: {{.ES_INDEX}} 34 | type: opensearch 35 | {{ end }} 36 | {{ if .LOCAL_INDEXING }} 37 | - metrics: [{{.METRICS}}] 38 | alerts: [{{.ALERTS}}] 39 | indexer: 40 | type: local 41 | metricsDirectory: collected-metrics-{{.UUID}} 42 | {{ end }} 43 | 44 | jobs: 45 | - name: node-density 46 | namespace: node-density 47 | jobIterations: {{.JOB_ITERATIONS}} 48 | qps: {{.QPS}} 49 | burst: {{.BURST}} 50 | namespacedIterations: {{.NAMESPACED_ITERATIONS}} 51 | iterationsPerNamespace: {{.ITERATIONS_PER_NAMESPACE}} 52 | churnConfig: 53 | cycles: {{.CHURN_CYCLES}} 54 | duration: {{.CHURN_DURATION}} 55 | percent: {{.CHURN_PERCENT}} 56 | delay: {{.CHURN_DELAY}} 57 | mode: {{.CHURN_MODE}} 58 | podWait: false 59 | waitWhenFinished: true 60 | preLoadImages: true 61 | preLoadPeriod: 10s 62 | namespaceLabels: 63 | security.openshift.io/scc.podSecurityLabelSync: false 64 | pod-security.kubernetes.io/enforce: privileged 65 | pod-security.kubernetes.io/audit: privileged 66 | pod-security.kubernetes.io/warn: privileged 67 | objects: 68 | 69 | - objectTemplate: pod.yml 70 | replicas: 1 71 | inputVars: 72 | containerImage: registry.k8s.io/pause:3.1 73 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/perfapp-deployment.yml: -------------------------------------------------------------------------------- 1 | kind: Deployment 2 | apiVersion: apps/v1 3 | metadata: 4 | name: anp-app-{{.Iteration}}-{{.Replica}} 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: perfapp-{{.Iteration}}-{{.Replica}} 10 | type: perfapp-{{.Iteration}}-{{.Replica}} 11 | trafficapp: perfapp 12 | tenant: {{.tenant}} 13 | spec: 14 | affinity: 15 | nodeAffinity: 16 | requiredDuringSchedulingIgnoredDuringExecution: 17 | nodeSelectorTerms: 18 | - matchExpressions: 19 | - key: node-role.kubernetes.io/worker 20 | operator: Exists 21 | - key: node-role.kubernetes.io/infra 22 | operator: DoesNotExist 23 | - key: node-role.kubernetes.io/workload 24 | operator: DoesNotExist 25 | containers: 26 | - name: perfapp 27 | image: quay.io/cloud-bulldozer/perfapp:latest 28 | imagePullPolicy: IfNotPresent 29 | readinessProbe: 30 | httpGet: 31 | path: /ready 32 | port: 8080 33 | periodSeconds: 10 34 | failureThreshold: 1 35 | timeoutSeconds: 60 36 | initialDelaySeconds: 30 37 | livenessProbe: 38 | httpGet: 39 | path: /health 40 | port: 8080 41 | periodSeconds: 10 42 | failureThreshold: 1 43 | timeoutSeconds: 15 44 | initialDelaySeconds: 30 45 | resources: 46 | requests: 47 | memory: "10Mi" 48 | cpu: "10m" 49 | ports: 50 | - containerPort: 8080 51 | protocol: TCP 52 | env: 53 | - name: POSTGRESQL_USER 54 | value: admin 55 | - name: POSTGRESQL_PASSWORD 56 | value: secret 57 | - name: POSTGRESQL_DATABASE 58 | value: node-density 59 | - name: POSTGRESQL_HOSTNAME 60 | value: postgres-{{.Iteration}}-{{.Replica}} 61 | - name: POSTGRESQL_PORT 62 | value: '5432' 63 | - name: POSTGRESQL_RETRY_INTERVAL 64 | value: '5' 65 | securityContext: 66 | privileged: false 67 | restartPolicy: Always 68 | replicas: {{.podReplicas}} 69 | selector: 70 | matchLabels: 71 | name: perfapp-{{.Iteration}}-{{.Replica}} 72 | strategy: 73 | type: RollingUpdate 74 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/pod-reader-pod.yml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: pod-reader 5 | labels: 6 | app: pod-reader 7 | spec: 8 | replicas: 1 9 | selector: 10 | matchLabels: 11 | app: pod-reader 12 | template: 13 | metadata: 14 | labels: 15 | app: pod-reader 16 | spec: 17 | serviceAccountName: pod-reader 18 | initContainers: 19 | - name: query-podinfo 20 | image: quay.io/openshift-psap-qe/alpine/curl-jq 21 | volumeMounts: 22 | - name: vol-www-data 23 | mountPath: /usr/share/nginx/html 24 | command: 25 | - /bin/sh 26 | - -c 27 | - | 28 | NAMESPACE="openshift-monitoring"; 29 | 30 | PODS_JSON=$(curl --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt \ 31 | -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ 32 | -s https://kubernetes.default.svc/api/v1/namespaces/${NAMESPACE}/pods); 33 | 34 | echo "$PODS_JSON" | jq -r '.items[] | .metadata.name as $name | .status.podIP as $ip | (.spec.containers[] | select(.ports != null) | .name as $cname | .ports[] | "\($name): \($ip):\(.containerPort)")'>/usr/share/nginx/html/podinfo.txt; 35 | echo "Fetch `cat /usr/share/nginx/html/podinfo.txt|wc -l` pod name, ip and port in openshift-monitoring"; 36 | containers: 37 | - name: pod-reader 38 | image: quay.io/openshift-psap-qe/pod-reader 39 | imagePullPolicy: IfNotPresent 40 | volumeMounts: 41 | - name: vol-www-data 42 | mountPath: /usr/share/nginx/html 43 | securityContext: 44 | runAsNonRoot: true 45 | seccompProfile: 46 | type: RuntimeDefault 47 | allowPrivilegeEscalation: false 48 | #runAsUser: 1000800000 49 | capabilities: 50 | drop: 51 | - ALL 52 | ports: 53 | - name: http-port 54 | containerPort: 8080 55 | readinessProbe: 56 | tcpSocket: 57 | port: 8080 58 | initialDelaySeconds: 15 59 | periodSeconds: 10 60 | livenessProbe: 61 | tcpSocket: 62 | port: 8080 63 | initialDelaySeconds: 15 64 | periodSeconds: 10 65 | volumes: 66 | - name: vol-www-data 67 | emptyDir: {} 68 | -------------------------------------------------------------------------------- /cmd/config/node-density-heavy/app-deployment.yml: -------------------------------------------------------------------------------- 1 | kind: Deployment 2 | apiVersion: apps/v1 3 | metadata: 4 | name: perfapp-{{.Replica}}-{{.Iteration}} 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: perfapp-{{.Replica}}-{{.Iteration}} 10 | app: perfapp 11 | spec: 12 | topologySpreadConstraints: 13 | - maxSkew: 1 14 | topologyKey: kubernetes.io/hostname 15 | whenUnsatisfiable: ScheduleAnyway 16 | labelSelector: 17 | matchLabels: 18 | app: perfapp 19 | affinity: 20 | nodeAffinity: 21 | requiredDuringSchedulingIgnoredDuringExecution: 22 | nodeSelectorTerms: 23 | - matchExpressions: 24 | - key: node-role.kubernetes.io/worker 25 | operator: Exists 26 | - key: node-role.kubernetes.io/infra 27 | operator: DoesNotExist 28 | - key: node-role.kubernetes.io/workload 29 | operator: DoesNotExist 30 | containers: 31 | - name: perfapp 32 | image: quay.io/cloud-bulldozer/perfapp:latest 33 | imagePullPolicy: IfNotPresent 34 | readinessProbe: 35 | httpGet: 36 | path: /ready 37 | port: 8080 38 | periodSeconds: {{ .probesPeriod }} 39 | failureThreshold: 1 40 | timeoutSeconds: 60 41 | initialDelaySeconds: 30 42 | livenessProbe: 43 | httpGet: 44 | path: /health 45 | port: 8080 46 | periodSeconds: {{ .probesPeriod }} 47 | failureThreshold: 1 48 | timeoutSeconds: 15 49 | initialDelaySeconds: 30 50 | resources: 51 | requests: 52 | memory: "10Mi" 53 | cpu: "10m" 54 | ports: 55 | - containerPort: 8080 56 | protocol: TCP 57 | env: 58 | - name: POSTGRESQL_USER 59 | value: admin 60 | - name: POSTGRESQL_PASSWORD 61 | value: secret 62 | - name: POSTGRESQL_DATABASE 63 | value: node-density 64 | - name: POSTGRESQL_HOSTNAME 65 | value: postgres-{{.Iteration}} 66 | - name: POSTGRESQL_PORT 67 | value: '5432' 68 | - name: POSTGRESQL_RETRY_INTERVAL 69 | value: '5' 70 | securityContext: 71 | privileged: false 72 | restartPolicy: Always 73 | replicas: 1 74 | selector: 75 | matchLabels: 76 | name: perfapp-{{.Replica}}-{{.Iteration}} 77 | strategy: 78 | type: RollingUpdate 79 | -------------------------------------------------------------------------------- /cmd/config/node-density-cni/node-density-cni.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | deletionStrategy: {{.DELETION_STRATEGY}} 6 | measurements: 7 | - name: podLatency 8 | thresholds: 9 | - conditionType: Ready 10 | metric: P99 11 | threshold: {{.POD_READY_THRESHOLD}} 12 | {{ if .PPROF }} 13 | - name: pprof 14 | pprofInterval: 2m 15 | pprofDirectory: pprof-data 16 | pprofTargets: 17 | - name: ovnkube-controller 18 | namespace: "openshift-ovn-kubernetes" 19 | labelSelector: {app: ovnkube-node} 20 | url: http://localhost:29103/debug/pprof/profile?seconds=30 21 | - name: ovnk-control-plane 22 | namespace: "openshift-ovn-kubernetes" 23 | labelSelector: {app: ovnkube-control-plane} 24 | url: http://localhost:29108/debug/pprof/profile?seconds=30 25 | {{ end }} 26 | {{ if .SVC_LATENCY }} 27 | - name: serviceLatency 28 | svcTimeout: 10s 29 | {{ end }} 30 | metricsEndpoints: 31 | {{ if .ES_SERVER }} 32 | - metrics: [{{.METRICS}}] 33 | alerts: [{{.ALERTS}}] 34 | indexer: 35 | esServers: ["{{.ES_SERVER}}"] 36 | insecureSkipVerify: true 37 | defaultIndex: {{.ES_INDEX}} 38 | type: opensearch 39 | {{ end }} 40 | {{ if .LOCAL_INDEXING }} 41 | - metrics: [{{.METRICS}}] 42 | alerts: [{{.ALERTS}}] 43 | indexer: 44 | type: local 45 | metricsDirectory: collected-metrics-{{.UUID}} 46 | {{ end }} 47 | 48 | jobs: 49 | - name: node-density-cni 50 | namespace: node-density-cni 51 | jobIterations: {{.JOB_ITERATIONS}} 52 | qps: {{.QPS}} 53 | burst: {{.BURST}} 54 | namespacedIterations: {{.NAMESPACED_ITERATIONS}} 55 | iterationsPerNamespace: {{.ITERATIONS_PER_NAMESPACE}} 56 | churnConfig: 57 | cycles: {{.CHURN_CYCLES}} 58 | duration: {{.CHURN_DURATION}} 59 | percent: {{.CHURN_PERCENT}} 60 | delay: {{.CHURN_DELAY}} 61 | mode: {{.CHURN_MODE}} 62 | podWait: false 63 | waitWhenFinished: true 64 | preLoadImages: true 65 | preLoadPeriod: 15s 66 | namespaceLabels: 67 | security.openshift.io/scc.podSecurityLabelSync: false 68 | pod-security.kubernetes.io/enforce: privileged 69 | pod-security.kubernetes.io/audit: privileged 70 | pod-security.kubernetes.io/warn: privileged 71 | objects: 72 | 73 | - objectTemplate: webserver-deployment.yml 74 | replicas: 1 75 | 76 | - objectTemplate: webserver-service.yml 77 | replicas: 1 78 | 79 | - objectTemplate: curl-deployment.yml 80 | replicas: 1 81 | -------------------------------------------------------------------------------- /cmd/config/rds-core/deployment-dpdk.yml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: dpdk-{{.Replica}} 5 | labels: 6 | group: load 7 | svc: dpdk-{{.Replica}} 8 | spec: 9 | replicas: {{.podReplicas}} 10 | selector: 11 | matchLabels: 12 | name: dpdk-{{.Replica}} 13 | template: 14 | metadata: 15 | labels: 16 | group: load 17 | name: dpdk-{{.Replica}} 18 | annotations: 19 | irq-load-balancing.crio.io: "disable" 20 | cpu-load-balancing.crio.io: "disable" 21 | cpu-quota.crio.io: "disable" 22 | k8s.v1.cni.cncf.io/networks: '[ 23 | { "name": "sriov-dpdk-net-{{ .Iteration }}-1" }, 24 | { "name": "sriov-dpdk-net-{{ .Iteration }}-2" } 25 | ]' 26 | spec: 27 | runtimeClassName: performance-{{.perf_profile}} 28 | containers: 29 | - name: dpdk 30 | image: ghcr.io/abraham2512/fedora-stress-ng:master 31 | imagePullPolicy: IfNotPresent 32 | # Request and Limits must be identical for the Pod to be assigned to the QoS Guarantee 33 | resources: 34 | requests: 35 | cpu: {{.dpdk_cores}} 36 | memory: 1024M 37 | hugepages-1Gi: {{.dpdk_hugepages}} 38 | limits: 39 | cpu: {{.dpdk_cores}} 40 | memory: 1024M 41 | hugepages-1Gi: {{.dpdk_hugepages}} 42 | env: 43 | - name: stress_cpu 44 | value: "4" 45 | - name: stress_vm 46 | value: "1" 47 | - name: stress_vm-bytes 48 | value: "512M" 49 | volumeMounts: 50 | - mountPath: /hugepages 51 | name: hugepage 52 | dnsPolicy: Default 53 | terminationGracePeriodSeconds: 1 54 | affinity: 55 | nodeAffinity: 56 | requiredDuringSchedulingIgnoredDuringExecution: 57 | nodeSelectorTerms: 58 | - matchExpressions: 59 | - key: node-role.kubernetes.io/worker-dpdk 60 | operator: Exists 61 | # Add not-ready/unreachable tolerations for 15 minutes so that node 62 | # failure doesn't trigger pod deletion. 63 | tolerations: 64 | - key: "node.kubernetes.io/not-ready" 65 | operator: "Exists" 66 | effect: "NoExecute" 67 | tolerationSeconds: 900 68 | - key: "node.kubernetes.io/unreachable" 69 | operator: "Exists" 70 | effect: "NoExecute" 71 | tolerationSeconds: 900 72 | volumes: 73 | - name: hugepage 74 | emptyDir: 75 | medium: HugePages 76 | -------------------------------------------------------------------------------- /hack/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2086 3 | # Quick install script for kube-burner-ocp 4 | # Downloads the latest release version based on system architecture and OS 5 | 6 | set -euo pipefail 7 | 8 | # Configuration 9 | ORG=kube-burner 10 | BIN_NAME=kube-burner-ocp 11 | REPO=${ORG}/${BIN_NAME} 12 | INSTALL_DIR="${INSTALL_DIR:-${HOME}/.local/bin/}" 13 | 14 | # Detect OS 15 | detect_os() { 16 | local os 17 | os=$(uname -s | tr '[:upper:]' '[:lower:]') 18 | 19 | case "${os}" in 20 | linux*) 21 | echo "linux" 22 | ;; 23 | darwin*) 24 | echo "darwin" 25 | ;; 26 | mingw* | msys* | cygwin*) 27 | echo "windows" 28 | ;; 29 | *) 30 | echo "Unsupported operating system: ${os}" 31 | exit 1 32 | ;; 33 | esac 34 | } 35 | 36 | # Get latest release version from GitHub 37 | get_latest_version() { 38 | local version 39 | if command -v curl &> /dev/null; then 40 | version=$(curl -sL "https://api.github.com/repos/${REPO}/releases/latest" | \ 41 | grep '"tag_name":' | \ 42 | sed -E 's/.*"([^"]+)".*/\1/') 43 | else 44 | echo "curl command not found. Please install it." 45 | exit 1 46 | fi 47 | 48 | if [[ -z "${version}" ]]; then 49 | echo "Failed to fetch latest version" 50 | exit 1 51 | fi 52 | 53 | echo "${version}" 54 | } 55 | 56 | # Download and extract binary 57 | download_and_extract() { 58 | local version=$1 59 | local os=$2 60 | local arch=$3 61 | local archive_name="${BIN_NAME}-${version}-${os}-${arch}.tar.gz" 62 | local download_url="https://github.com/${REPO}/releases/download/${version}/${archive_name}" 63 | mkdir -p ${INSTALL_DIR} 64 | echo "Downloading ${BIN_NAME} ${version} for ${os}/${arch}..." 65 | echo "URL: ${download_url}" 66 | curl -sL -f "${download_url}" | tar xz -C ${INSTALL_DIR} ${BIN_NAME} 67 | } 68 | 69 | # Verify installation 70 | verify_installation() { 71 | if command -v ${BIN_NAME} &> /dev/null; then 72 | echo "${BIN_NAME} is now available in your PATH, installed at ${INSTALL_DIR}" 73 | else 74 | echo "${BIN_NAME} installed to ${INSTALL_DIR}, but not found in PATH" 75 | echo "You may need to add ${INSTALL_DIR} to your PATH" 76 | fi 77 | } 78 | 79 | echo "Starting ${BIN_NAME}-ocp 🔥 installation..." 80 | # Detect system 81 | os=$(detect_os) 82 | arch=$(uname -m | sed s/aarch64/arm64/) 83 | echo "Detected system: ${os}/${arch}" 84 | # Get latest version 85 | version=$(get_latest_version) 86 | echo "Latest version: ${version}" 87 | # Download and extract 88 | download_and_extract "${version}" "${os}" "${arch}" 89 | # Verify 90 | verify_installation 91 | echo "Get started with: ${BIN_NAME} help" 92 | -------------------------------------------------------------------------------- /pkg/workloads/web-burner.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Kube-burner Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package workloads 16 | 17 | import ( 18 | "fmt" 19 | "os" 20 | "time" 21 | 22 | "github.com/kube-burner/kube-burner/v2/pkg/workloads" 23 | "github.com/spf13/cobra" 24 | ) 25 | 26 | // NewClusterDensity holds cluster-density workload 27 | func NewWebBurner(wh *workloads.WorkloadHelper, variant string) *cobra.Command { 28 | var limitcount, scale int 29 | var bfd, crd, icni, probe, sriov bool 30 | var bridge string 31 | var podReadyThreshold time.Duration 32 | var metricsProfiles []string 33 | var rc int 34 | cmd := &cobra.Command{ 35 | Use: variant, 36 | Short: fmt.Sprintf("Runs %v workload", variant), 37 | Run: func(cmd *cobra.Command, args []string) { 38 | setMetrics(cmd, metricsProfiles) 39 | AdditionalVars["BFD"] = bfd 40 | AdditionalVars["BRIDGE"] = bridge 41 | AdditionalVars["CRD"] = crd 42 | AdditionalVars["ICNI"] = icni 43 | AdditionalVars["LIMITCOUNT"] = limitcount 44 | AdditionalVars["POD_READY_THRESHOLD"] = podReadyThreshold 45 | AdditionalVars["PROBE"] = probe 46 | AdditionalVars["SCALE"] = scale 47 | AdditionalVars["SRIOV"] = sriov 48 | 49 | wh.SetVariables(AdditionalVars, nil) 50 | rc = wh.Run(cmd.Name() + ".yml") 51 | }, 52 | PostRun: func(cmd *cobra.Command, args []string) { 53 | os.Exit(rc) 54 | }, 55 | } 56 | cmd.Flags().DurationVar(&podReadyThreshold, "pod-ready-threshold", 2*time.Minute, "Pod ready timeout threshold") 57 | cmd.Flags().IntVar(&limitcount, "limitcount", 1, "Limitcount") 58 | cmd.Flags().IntVar(&scale, "scale", 1, "Scale") 59 | cmd.Flags().BoolVar(&bfd, "bfd", true, "Enable BFD") 60 | cmd.Flags().BoolVar(&crd, "crd", true, "Enable AdminPolicyBasedExternalRoute CR") 61 | cmd.Flags().BoolVar(&icni, "icni", true, "Enable ICNI functionality") 62 | cmd.Flags().BoolVar(&probe, "probe", false, "Enable readiness probes") 63 | cmd.Flags().BoolVar(&sriov, "sriov", true, "Enable SRIOV") 64 | cmd.Flags().StringVar(&bridge, "bridge", "br-ex", "Data-plane bridge") 65 | cmd.Flags().StringSliceVar(&metricsProfiles, "metrics-profile", []string{"metrics.yml"}, "Comma separated list of metrics profiles to use") 66 | return cmd 67 | } 68 | -------------------------------------------------------------------------------- /cmd/config/node-density-heavy/node-density-heavy.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | deletionStrategy: {{.DELETION_STRATEGY}} 6 | measurements: 7 | - name: podLatency 8 | thresholds: 9 | - conditionType: Ready 10 | metric: P99 11 | threshold: {{.POD_READY_THRESHOLD}} 12 | {{ if .PPROF }} 13 | - name: pprof 14 | pprofInterval: 2m 15 | pprofDirectory: pprof-data 16 | pprofTargets: 17 | - name: ovnkube-controller 18 | namespace: "openshift-ovn-kubernetes" 19 | labelSelector: {app: ovnkube-node} 20 | url: http://localhost:29103/debug/pprof/profile?seconds=30 21 | - name: ovnk-control-plane 22 | namespace: "openshift-ovn-kubernetes" 23 | labelSelector: {app: ovnkube-control-plane} 24 | url: http://localhost:29108/debug/pprof/profile?seconds=30 25 | {{ end }} 26 | {{ if .SVC_LATENCY }} 27 | - name: serviceLatency 28 | svcTimeout: 10s 29 | {{ end }} 30 | metricsEndpoints: 31 | {{ if .ES_SERVER }} 32 | - metrics: [{{.METRICS}}] 33 | alerts: [{{.ALERTS}}] 34 | indexer: 35 | esServers: ["{{.ES_SERVER}}"] 36 | insecureSkipVerify: true 37 | defaultIndex: {{.ES_INDEX}} 38 | type: opensearch 39 | {{ end }} 40 | {{ if .LOCAL_INDEXING }} 41 | - metrics: [{{.METRICS}}] 42 | alerts: [{{.ALERTS}}] 43 | indexer: 44 | type: local 45 | metricsDirectory: collected-metrics-{{.UUID}} 46 | {{ end }} 47 | 48 | jobs: 49 | - name: node-density-heavy 50 | namespace: node-density-heavy 51 | jobIterations: {{.JOB_ITERATIONS}} 52 | qps: {{.QPS}} 53 | burst: {{.BURST}} 54 | namespacedIterations: {{.NAMESPACED_ITERATIONS}} 55 | iterationsPerNamespace: {{.ITERATIONS_PER_NAMESPACE}} 56 | churnConfig: 57 | cycles: {{.CHURN_CYCLES}} 58 | duration: {{.CHURN_DURATION}} 59 | percent: {{.CHURN_PERCENT}} 60 | delay: {{.CHURN_DELAY}} 61 | mode: {{.CHURN_MODE}} 62 | podWait: false 63 | waitWhenFinished: true 64 | preLoadImages: true 65 | preLoadPeriod: 15s 66 | namespaceLabels: 67 | security.openshift.io/scc.podSecurityLabelSync: false 68 | pod-security.kubernetes.io/enforce: privileged 69 | pod-security.kubernetes.io/audit: privileged 70 | pod-security.kubernetes.io/warn: privileged 71 | objects: 72 | 73 | - objectTemplate: postgres-deployment.yml 74 | replicas: 1 75 | churn: false # If the posgres database gets restarted it will lose the table schema and leading failures in the client side readiness probes 76 | 77 | - objectTemplate: app-deployment.yml 78 | replicas: 1 79 | inputVars: 80 | probesPeriod: {{.PROBES_PERIOD}} 81 | 82 | - objectTemplate: postgres-service.yml 83 | replicas: 1 84 | -------------------------------------------------------------------------------- /cmd/config/virt-clone/templates/vm.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kubevirt.io/v1 2 | kind: VirtualMachine 3 | metadata: 4 | name: "{{ .vmName }}-{{ .Iteration }}-{{ .Replica }}" 5 | spec: 6 | dataVolumeTemplates: 7 | - metadata: 8 | name: "{{ .vmName }}-{{ .Iteration }}-{{ .Replica }}" 9 | spec: 10 | {{ if .rootdiskVolumeSource }} 11 | source: {{ .rootdiskVolumeSource | mustToJson }} 12 | {{ end }} 13 | {{ if .rootdiskVolumeSourceRef }} 14 | sourceRef: {{ .rootdiskVolumeSourceRef | mustToJson }} 15 | {{ end }} 16 | storage: 17 | accessModes: 18 | - {{ .accessMode }} 19 | storageClassName: {{ .storageClassName }} 20 | resources: 21 | requests: 22 | storage: {{ default "6Gi" .rootVolumeSize }} 23 | {{ range $dataVolumeIndex := .dataVolumeCounters }} 24 | - metadata: 25 | name: "{{ $.vmName }}-{{ $.Iteration }}-{{ $.Replica }}-data-{{ $dataVolumeIndex }}" 26 | spec: 27 | source: 28 | blank: {} 29 | storage: 30 | accessModes: 31 | - {{ $.accessMode }} 32 | storageClassName: {{ $.storageClassName }} 33 | resources: 34 | requests: 35 | storage: "1Gi" 36 | {{ end }} 37 | runStrategy: RerunOnFailure 38 | template: 39 | spec: 40 | accessCredentials: 41 | - sshPublicKey: 42 | propagationMethod: 43 | noCloud: {} 44 | source: 45 | secret: 46 | secretName: {{ .sshPublicKeySecret }} 47 | architecture: amd64 48 | domain: 49 | resources: 50 | requests: 51 | memory: {{ default "512Mi" .vmMemory }} 52 | devices: 53 | disks: 54 | - disk: 55 | bus: virtio 56 | name: rootdisk 57 | bootOrder: 1 58 | {{ range $dataVolumeIndex := .dataVolumeCounters }} 59 | - disk: 60 | bus: virtio 61 | name: "data-{{ $dataVolumeIndex }}" 62 | {{ end }} 63 | - disk: 64 | bus: virtio 65 | name: cloudinitdisk 66 | interfaces: 67 | - name: default 68 | masquerade: {} 69 | bootOrder: 2 70 | machine: 71 | type: pc-q35-rhel9.4.0 72 | networks: 73 | - name: default 74 | pod: {} 75 | volumes: 76 | - dataVolume: 77 | name: "{{ .vmName }}-{{ .Iteration }}-{{ .Replica }}" 78 | name: rootdisk 79 | {{ range $dataVolumeIndex := .dataVolumeCounters }} 80 | - dataVolume: 81 | name: "{{ $.vmName }}-{{ $.Iteration }}-{{ $.Replica }}-data-{{ $dataVolumeIndex }}" 82 | name: "data-{{ $dataVolumeIndex }}" 83 | {{ end }} 84 | - cloudInitNoCloud: 85 | userData: | 86 | #cloud-config 87 | chpasswd: 88 | expire: false 89 | password: {{ uuidv4 }} 90 | user: fedora 91 | runcmd: [] 92 | name: cloudinitdisk 93 | -------------------------------------------------------------------------------- /cmd/config/virt-udn-density/virt-udn-density.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | deletionStrategy: {{.DELETION_STRATEGY}} 6 | measurements: 7 | - name: vmiLatency 8 | thresholds: 9 | - conditionType: VMIRunning 10 | metric: P99 11 | threshold: {{.VMI_RUNNING_THRESHOLD}} 12 | metricsEndpoints: 13 | {{ if .ES_SERVER }} 14 | - metrics: [{{.METRICS}}] 15 | alerts: [{{.ALERTS}}] 16 | indexer: 17 | esServers: ["{{.ES_SERVER}}"] 18 | insecureSkipVerify: true 19 | defaultIndex: {{.ES_INDEX}} 20 | type: opensearch 21 | {{ end }} 22 | {{ if .LOCAL_INDEXING }} 23 | - metrics: [{{.METRICS}}] 24 | alerts: [{{.ALERTS}}] 25 | indexer: 26 | type: local 27 | metricsDirectory: collected-metrics-{{.UUID}} 28 | {{ end }} 29 | jobs: 30 | {{ if .ENABLE_LAYER_3 }} 31 | - name: create-udn-l3 32 | {{ else }} 33 | - name: create-udn-l2 34 | {{ end }} 35 | namespace: virt-density-udn 36 | jobIterations: {{.JOB_ITERATIONS}} 37 | qps: {{.QPS}} 38 | burst: {{.BURST}} 39 | namespacedIterations: true 40 | podWait: false 41 | waitWhenFinished: true 42 | preLoadImages: true 43 | preLoadPeriod: 15s 44 | churnConfig: 45 | cycles: {{.CHURN_CYCLES}} 46 | duration: {{.CHURN_DURATION}} 47 | percent: {{.CHURN_PERCENT}} 48 | delay: {{.CHURN_DELAY}} 49 | mode: {{.CHURN_MODE}} 50 | jobPause: {{.JOB_PAUSE}} 51 | namespaceLabels: 52 | security.openshift.io/scc.podSecurityLabelSync: false 53 | pod-security.kubernetes.io/enforce: privileged 54 | pod-security.kubernetes.io/audit: privileged 55 | pod-security.kubernetes.io/warn: privileged 56 | k8s.ovn.org/primary-user-defined-network: "" 57 | objects: 58 | {{ if .ENABLE_LAYER_3 }} 59 | - objectTemplate: udn_l3.yml 60 | replicas: 1 61 | {{ else }} 62 | - objectTemplate: udn_l2.yml 63 | replicas: 1 64 | {{ end }} 65 | 66 | - name: virt-density-udn 67 | namespace: virt-density-udn 68 | jobIterations: {{.JOB_ITERATIONS}} 69 | qps: {{.QPS}} 70 | burst: {{.BURST}} 71 | namespacedIterations: true 72 | preLoadImages: false 73 | preLoadPeriod: 15s 74 | waitWhenFinished: true 75 | jobPause: 2m 76 | namespaceLabels: 77 | security.openshift.io/scc.podSecurityLabelSync: false 78 | pod-security.kubernetes.io/enforce: privileged 79 | pod-security.kubernetes.io/audit: privileged 80 | pod-security.kubernetes.io/warn: privileged 81 | k8s.ovn.org/primary-user-defined-network: "" 82 | objects: 83 | 84 | - objectTemplate: vm-client.yml 85 | replicas: {{.VMS_PER_ITERATION}} 86 | inputVars: 87 | bindingMethod: {{.UDN_BINDING_METHOD}} 88 | vmImage: {{.VM_IMAGE}} 89 | - objectTemplate: vm-server.yml 90 | replicas: 1 91 | inputVars: 92 | bindingMethod: {{.UDN_BINDING_METHOD}} 93 | vmImage: {{.VM_IMAGE}} 94 | -------------------------------------------------------------------------------- /cmd/config/anp-density-pods/egress-traffic-app.yml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: anp-reqegress-{{.Iteration}}-{{.Replica}} 5 | labels: 6 | app: egress-traffic-app 7 | spec: 8 | replicas: {{.podReplicas}} 9 | selector: 10 | matchLabels: 11 | type: anp-reqegress-{{.Iteration}}-{{.Replica}} 12 | tenant: {{.tenant}} 13 | template: 14 | metadata: 15 | labels: 16 | type: anp-reqegress-{{.Iteration}}-{{.Replica}} 17 | tenant: {{.tenant}} 18 | spec: 19 | affinity: 20 | nodeAffinity: 21 | requiredDuringSchedulingIgnoredDuringExecution: 22 | nodeSelectorTerms: 23 | - matchExpressions: 24 | - key: node-role.kubernetes.io/worker 25 | operator: Exists 26 | - key: node-role.kubernetes.io/infra 27 | operator: DoesNotExist 28 | - key: node-role.kubernetes.io/workload 29 | operator: DoesNotExist 30 | containers: 31 | - name: keepalive 32 | image: quay.io/openshift-psap-qe/ubi9-minimal 33 | imagePullPolicy: IfNotPresent 34 | env: 35 | - name: NODE_IP 36 | valueFrom: 37 | fieldRef: 38 | fieldPath: status.hostIP 39 | securityContext: 40 | runAsNonRoot: true 41 | seccompProfile: 42 | type: RuntimeDefault 43 | allowPrivilegeEscalation: false 44 | capabilities: 45 | drop: 46 | - ALL 47 | ports: 48 | - containerPort: 8080 49 | imagePullPolicy: IfNotPresent 50 | command: [ "/bin/bash", "-c", "--" ] 51 | args: 52 | - while true; 53 | do 54 | echo "Checking Egress connectivity to $NODE_IP for Node IP Selector Request"; 55 | nc -vz $NODE_IP 9001 -w 5; 56 | sleep 2; 57 | nc -vz $NODE_IP 9100 -w 5; 58 | echo "Checking connectivity to internet for Egress Firewall Test"; 59 | sleep 2; 60 | curl -Is http://www.google.com | head -n 1; 61 | sleep 2; 62 | ping -c 5 8.8.8.8; 63 | sleep 2; 64 | curl -Is https://www.redhat.com/ | head -n 1; 65 | sleep 2; 66 | ping -c 5 8.8.4.4; 67 | echo "Checking connectivity to Egress Request Across NS for Pod IP/CIDR Selector Request"; 68 | curl -s http://pod-reader-service.anp-pod-reader.svc.cluster.local:8080/podinfo.txt | sort | uniq | grep -E '9100|9091'| awk '{print $2}'| tr ":" " ">/tmp/targetPods.lst; 69 | max=` wc -l /tmp/targetPods.lst|awk '{print $1}'`; 70 | for((i=1;i<=$max;i++)); 71 | do 72 | pod=`sed -n ${i}p /tmp/targetPods.lst`; 73 | echo nc -vz $pod -w 3; 74 | echo "--------------------------------------------------------"; 75 | nc -vz $pod -w 3; 76 | sleep 2; 77 | done; 78 | done 79 | -------------------------------------------------------------------------------- /cmd/config/virt-migration/check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | COMMAND=$1 3 | LABEL_KEY=$2 4 | LABEL_VALUE=$3 5 | NAMESPACE=$4 6 | IDENTITY_FILE=$5 7 | REMOTE_USER=$6 8 | EXPECTED_ROOT_SIZE=$7 9 | EXPECTED_DATA_SIZE=$8 10 | 11 | # Wait up to ~60 minutes 12 | MAX_RETRIES=130 13 | # In the first reties use a shorter sleep 14 | MAX_SHORT_WAITS=12 15 | SHORT_WAIT=5 16 | LONG_WAIT=30 17 | 18 | if virtctl ssh --help | grep -qc "\--local-ssh " ; then 19 | LOCAL_SSH="--local-ssh" 20 | else 21 | LOCAL_SSH="" 22 | fi 23 | 24 | get_vms() { 25 | local namespace=$1 26 | local label_key=$2 27 | local label_value=$3 28 | 29 | local vms 30 | vms=$(kubectl get vm -n "${namespace}" -l "${label_key}"="${label_value}" -o json | jq .items | jq -r '.[] | .metadata.name') 31 | local ret=$? 32 | if [ $ret -ne 0 ]; then 33 | echo "Failed to get VM list" 34 | exit 1 35 | fi 36 | echo "${vms}" 37 | } 38 | 39 | remote_command() { 40 | local namespace=$1 41 | local identity_file=$2 42 | local remote_user=$3 43 | local vm_name=$4 44 | local command=$5 45 | 46 | local output 47 | output=$(virtctl ssh ${LOCAL_SSH} --local-ssh-opts="-o StrictHostKeyChecking=no" --local-ssh-opts="-o UserKnownHostsFile=/dev/null" -n "${namespace}" -i "${identity_file}" -c "${command}" --username "${remote_user}" "${vm_name}" 2>/dev/null) 48 | local ret=$? 49 | if [ $ret -ne 0 ]; then 50 | return 1 51 | fi 52 | echo "${output}" 53 | } 54 | 55 | check_vm_running() { 56 | local vm=$1 57 | remote_command "${NAMESPACE}" "${IDENTITY_FILE}" "${REMOTE_USER}" "${vm}" "ls" 58 | return $? 59 | } 60 | 61 | check_resize() { 62 | local vm=$1 63 | 64 | local blk_devices 65 | blk_devices=$(remote_command "${NAMESPACE}" "${IDENTITY_FILE}" "${REMOTE_USER}" "${vm}" "lsblk --json -v --output=NAME,SIZE") 66 | local ret=$? 67 | if [ $ret -ne 0 ]; then 68 | return $ret 69 | fi 70 | 71 | local size 72 | size=$(echo "${blk_devices}" | jq .blockdevices | jq -r --arg name "vda" '.[] | select(.name == $name) | .size') 73 | if [[ $size != "${EXPECTED_ROOT_SIZE}" ]]; then 74 | return 1 75 | fi 76 | 77 | local datavolume_sizes 78 | datavolume_sizes=$(echo "${blk_devices}" | jq .blockdevices | jq -r --arg name "vda" '.[] | select(.name != $name) | .size') 79 | for datavolume_size in ${datavolume_sizes}; do 80 | if [[ $datavolume_size != "${EXPECTED_DATA_SIZE}" ]]; then 81 | return 1 82 | fi 83 | done 84 | 85 | return 0 86 | } 87 | 88 | VMS=$(get_vms "${NAMESPACE}" "${LABEL_KEY}" "${LABEL_VALUE}") 89 | 90 | for vm in ${VMS}; do 91 | for attempt in $(seq 1 $MAX_RETRIES); do 92 | if ${COMMAND} "${vm}"; then 93 | break 94 | fi 95 | if [ "${attempt}" -lt $MAX_RETRIES ]; then 96 | if [ "${attempt}" -lt $MAX_SHORT_WAITS ]; then 97 | sleep "${SHORT_WAIT}" 98 | else 99 | sleep "${LONG_WAIT}" 100 | fi 101 | else 102 | echo "Failed waiting on ${COMMAND} for ${vm}" >&2 103 | exit 1 104 | fi 105 | done 106 | echo "${COMMAND} finished successfully for ${vm}" 107 | done 108 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/cluster-density-v2.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | gc: {{.GC}} 4 | gcMetrics: {{.GC_METRICS}} 5 | deletionStrategy: {{.DELETION_STRATEGY}} 6 | measurements: 7 | - name: podLatency 8 | thresholds: 9 | - conditionType: Ready 10 | metric: P99 11 | threshold: {{.POD_READY_THRESHOLD}} 12 | {{ if .PPROF }} 13 | - name: pprof 14 | pprofInterval: 2m 15 | pprofDirectory: pprof-data 16 | pprofTargets: 17 | - name: ovnkube-controller 18 | namespace: "openshift-ovn-kubernetes" 19 | labelSelector: {app: ovnkube-node} 20 | url: http://localhost:29103/debug/pprof/profile?seconds=30 21 | - name: ovnk-control-plane 22 | namespace: "openshift-ovn-kubernetes" 23 | labelSelector: {app: ovnkube-control-plane} 24 | url: http://localhost:29108/debug/pprof/profile?seconds=30 25 | {{ end }} 26 | {{ if .SVC_LATENCY }} 27 | - name: serviceLatency 28 | svcTimeout: 10s 29 | {{ end }} 30 | metricsEndpoints: 31 | {{ if .ES_SERVER }} 32 | - metrics: [{{.METRICS}}] 33 | alerts: [{{.ALERTS}}] 34 | indexer: 35 | esServers: ["{{.ES_SERVER}}"] 36 | insecureSkipVerify: true 37 | defaultIndex: {{.ES_INDEX}} 38 | type: opensearch 39 | {{ end }} 40 | {{ if .LOCAL_INDEXING }} 41 | - metrics: [{{.METRICS}}] 42 | alerts: [{{.ALERTS}}] 43 | indexer: 44 | type: local 45 | metricsDirectory: collected-metrics-{{.UUID}} 46 | {{ end }} 47 | 48 | jobs: 49 | - name: cluster-density-v2 50 | namespace: cluster-density-v2 51 | jobIterations: {{.JOB_ITERATIONS}} 52 | qps: {{.QPS}} 53 | burst: {{.BURST}} 54 | namespacedIterations: true 55 | podWait: false 56 | waitWhenFinished: true 57 | preLoadImages: true 58 | preLoadPeriod: 15s 59 | churnConfig: 60 | cycles: {{.CHURN_CYCLES}} 61 | duration: {{.CHURN_DURATION}} 62 | percent: {{.CHURN_PERCENT}} 63 | delay: {{.CHURN_DELAY}} 64 | mode: {{.CHURN_MODE}} 65 | namespaceLabels: 66 | security.openshift.io/scc.podSecurityLabelSync: false 67 | pod-security.kubernetes.io/enforce: privileged 68 | pod-security.kubernetes.io/audit: privileged 69 | pod-security.kubernetes.io/warn: privileged 70 | objects: 71 | 72 | - objectTemplate: imagestream.yml 73 | replicas: 1 74 | 75 | - objectTemplate: build.yml 76 | replicas: 1 77 | 78 | - objectTemplate: service.yml 79 | replicas: 5 80 | 81 | - objectTemplate: route.yml 82 | replicas: 2 83 | 84 | - objectTemplate: secret.yml 85 | replicas: 10 86 | 87 | - objectTemplate: configmap.yml 88 | replicas: 10 89 | 90 | - objectTemplate: np-deny-all.yml 91 | replicas: 1 92 | 93 | - objectTemplate: np-allow-from-clients.yml 94 | replicas: 1 95 | 96 | - objectTemplate: np-allow-from-ingress.yml 97 | replicas: 1 98 | 99 | - objectTemplate: deployment-server.yml 100 | replicas: 3 101 | inputVars: 102 | podReplicas: 2 103 | 104 | - objectTemplate: deployment-client.yml 105 | replicas: 2 106 | inputVars: 107 | podReplicas: 2 108 | ingressDomain: {{.INGRESS_DOMAIN}} 109 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-v2/deployment-server.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Deployment 3 | apiVersion: apps/v1 4 | metadata: 5 | name: server-{{.Replica}} 6 | spec: 7 | replicas: {{.podReplicas}} 8 | selector: 9 | matchLabels: 10 | name: cluster-density-{{.Replica}} 11 | template: 12 | metadata: 13 | labels: 14 | name: cluster-density-{{.Replica}} 15 | app: nginx 16 | spec: 17 | topologySpreadConstraints: 18 | - maxSkew: 1 19 | topologyKey: kubernetes.io/hostname 20 | whenUnsatisfiable: ScheduleAnyway 21 | labelSelector: 22 | matchLabels: 23 | app: nginx 24 | affinity: 25 | nodeAffinity: 26 | requiredDuringSchedulingIgnoredDuringExecution: 27 | nodeSelectorTerms: 28 | - matchExpressions: 29 | - key: node-role.kubernetes.io/worker 30 | operator: Exists 31 | - key: node-role.kubernetes.io/infra 32 | operator: DoesNotExist 33 | - key: node-role.kubernetes.io/workload 34 | operator: DoesNotExist 35 | containers: 36 | - image: quay.io/cloud-bulldozer/nginx:latest 37 | resources: 38 | requests: 39 | memory: "25Mi" 40 | cpu: "25m" 41 | volumeMounts: 42 | - name: secret-1 43 | mountPath: /secret1 44 | - name: secret-2 45 | mountPath: /secret2 46 | - name: secret-3 47 | mountPath: /secret3 48 | - name: secret-4 49 | mountPath: /secret4 50 | - name: configmap-1 51 | mountPath: /configmap1 52 | - name: configmap-2 53 | mountPath: /configmap2 54 | - name: configmap-3 55 | mountPath: /configmap3 56 | - name: configmap-4 57 | mountPath: /configmap4 58 | - name: podinfo 59 | mountPath: /etc/podlabels 60 | imagePullPolicy: IfNotPresent 61 | ports: 62 | - containerPort: 8080 63 | protocol: TCP 64 | - containerPort: 8443 65 | protocol: TCP 66 | name: cluster-density 67 | env: 68 | - name: ENVVAR1 69 | value: "{{randAlphaNum 250}}" 70 | - name: ENVVAR2 71 | value: "{{randAlphaNum 250}}" 72 | - name: ENVVAR3 73 | value: "{{randAlphaNum 250}}" 74 | - name: ENVVAR4 75 | value: "{{randAlphaNum 250}}" 76 | volumes: 77 | - name: secret-1 78 | secret: 79 | secretName: {{.JobName}}-1 80 | - name: secret-2 81 | secret: 82 | secretName: {{.JobName}}-2 83 | - name: secret-3 84 | secret: 85 | secretName: {{.JobName}}-3 86 | - name: secret-4 87 | secret: 88 | secretName: {{.JobName}}-4 89 | - name: configmap-1 90 | configMap: 91 | name: {{.JobName}}-1 92 | - name: configmap-2 93 | configMap: 94 | name: {{.JobName}}-2 95 | - name: configmap-3 96 | configMap: 97 | name: {{.JobName}}-3 98 | - name: configmap-4 99 | configMap: 100 | name: {{.JobName}}-4 101 | - name: podinfo 102 | downwardAPI: 103 | items: 104 | - path: "labels" 105 | fieldRef: 106 | fieldPath: metadata.labels 107 | -------------------------------------------------------------------------------- /cmd/config/virt-migration/templates/vm.yml: -------------------------------------------------------------------------------- 1 | {{- $storageClassName := .storageClassName -}} 2 | {{- $dataVolumeLabels := .dataVolumeLabels -}} 3 | {{- $name := .name -}} 4 | {{- $counter := .counter -}} 5 | {{- $replica := .Replica }} 6 | {{- $iteration := .Iteration }} 7 | 8 | apiVersion: kubevirt.io/v1 9 | kind: VirtualMachine 10 | metadata: 11 | name: "{{ $name }}-{{ $iteration }}-{{ $replica }}" 12 | spec: 13 | dataVolumeTemplates: 14 | - metadata: 15 | name: "{{ $name }}-{{ $iteration }}-{{ $replica }}-root" 16 | spec: 17 | source: 18 | registry: 19 | url: "docker://{{ .rootDiskImage }}" 20 | storage: 21 | accessModes: 22 | - "ReadWriteMany" 23 | storageClassName: {{ .storageClassName }} 24 | resources: 25 | requests: 26 | storage: "10Gi" 27 | {{ range $dataVolumeIndex := .dataVolumeCounters }} 28 | - metadata: 29 | name: "{{ $name }}-{{ $iteration }}-{{ $replica }}-data-{{ $dataVolumeIndex }}" 30 | spec: 31 | source: 32 | blank: {} 33 | storage: 34 | accessModes: 35 | - "ReadWriteMany" 36 | storageClassName: {{ $storageClassName }} 37 | resources: 38 | requests: 39 | storage: "1Gi" 40 | {{ end }} 41 | runStrategy: RerunOnFailure 42 | template: 43 | spec: 44 | affinity: 45 | nodeAffinity: 46 | requiredDuringSchedulingIgnoredDuringExecution: 47 | nodeSelectorTerms: 48 | - matchExpressions: 49 | - key: kubernetes.io/hostname 50 | operator: {{ .affinity }} 51 | values: 52 | - {{ .workerNodeName }} 53 | accessCredentials: 54 | - sshPublicKey: 55 | propagationMethod: 56 | noCloud: {} 57 | source: 58 | secret: 59 | secretName: "{{ .sshPublicKeySecret }}" 60 | architecture: amd64 61 | domain: 62 | resources: 63 | requests: 64 | memory: {{ default "512Mi" .vmMemory }} 65 | devices: 66 | disks: 67 | - disk: 68 | bus: virtio 69 | name: rootdisk 70 | bootOrder: 1 71 | {{ range $dataVolumeIndex := .dataVolumeCounters }} 72 | - disk: 73 | bus: virtio 74 | name: "data-{{ $dataVolumeIndex }}" 75 | {{ end }} 76 | - disk: 77 | bus: virtio 78 | name: cloudinitdisk 79 | interfaces: 80 | - name: default 81 | masquerade: {} 82 | bootOrder: 2 83 | machine: 84 | type: pc-q35-rhel9.4.0 85 | networks: 86 | - name: default 87 | pod: {} 88 | volumes: 89 | - dataVolume: 90 | name: "{{ .name }}-{{ $iteration }}-{{ .Replica }}-root" 91 | name: rootdisk 92 | {{ range $dataVolumeIndex := .dataVolumeCounters }} 93 | - dataVolume: 94 | name: "{{ $name }}-{{ $iteration }}-{{ $replica }}-data-{{ $dataVolumeIndex }}" 95 | name: "data-{{ . }}" 96 | {{ end }} 97 | - cloudInitNoCloud: 98 | userData: | 99 | #cloud-config 100 | chpasswd: 101 | expire: false 102 | password: {{ uuidv4 }} 103 | user: fedora 104 | runcmd: [] 105 | name: cloudinitdisk 106 | -------------------------------------------------------------------------------- /pkg/workloads/kueue-operator.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Kube-burner Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package workloads 16 | 17 | import ( 18 | "fmt" 19 | "os" 20 | 21 | "github.com/kube-burner/kube-burner/v2/pkg/workloads" 22 | 23 | "github.com/spf13/cobra" 24 | ) 25 | 26 | const kueueOperatorJobsShared = "kueue-operator-jobs-shared" 27 | 28 | // NewKueueOperator holds kueue-operator workload 29 | func NewKueueOperator(wh *workloads.WorkloadHelper, variant string) *cobra.Command { 30 | var rc int 31 | var metricsProfiles []string 32 | var iterations int 33 | var workloadRuntime string 34 | var defaultJobReplicas, podReplicas, jobReplicas, defaultIterations, parallelism int 35 | var QPS, burst int 36 | var podsQuota int 37 | cmd := &cobra.Command{ 38 | Use: variant, 39 | Short: fmt.Sprintf("Runs %v workload", variant), 40 | SilenceUsage: true, 41 | Run: func(cmd *cobra.Command, args []string) { 42 | podsQuota = jobReplicas * parallelism 43 | if cmd.Name() == kueueOperatorJobsShared { 44 | // We set the pod quota to the 75% pods deployed in each iteration to ensure the clusterqueue share resources with others 45 | podsQuota = int(float64(jobReplicas*parallelism) * 0.75) 46 | } 47 | AdditionalVars["PODS_QUOTA"] = podsQuota 48 | AdditionalVars["JOB_REPLICAS"] = jobReplicas 49 | AdditionalVars["POD_REPLICAS"] = podReplicas 50 | AdditionalVars["PARALLELISM"] = parallelism 51 | AdditionalVars["ITERATIONS"] = iterations 52 | AdditionalVars["WORKLOAD_RUNTIME"] = workloadRuntime 53 | AdditionalVars["QPS"] = QPS 54 | AdditionalVars["BURST"] = burst 55 | setMetrics(cmd, metricsProfiles) 56 | wh.SetVariables(AdditionalVars, nil) 57 | rc = wh.Run(cmd.Name() + ".yml") 58 | }, 59 | PostRun: func(cmd *cobra.Command, args []string) { 60 | os.Exit(rc) 61 | }, 62 | } 63 | 64 | defaultJobReplicas = 2000 65 | defaultIterations = 1 66 | cmd.Flags().StringVar(&workloadRuntime, "workload-runtime", "10s", "Workload runtime") 67 | if variant == "kueue-operator-jobs" || variant == kueueOperatorJobsShared { 68 | cmd.Flags().IntVar(¶llelism, "parallelism", 5, "Number of jobs or pods to run in parallel") 69 | if variant == kueueOperatorJobsShared { 70 | defaultJobReplicas = 400 71 | defaultIterations = 10 72 | } 73 | cmd.Flags().IntVar(&jobReplicas, "job-replicas", defaultJobReplicas, "Jobs per iteration") 74 | } 75 | if variant == "kueue-operator-pods" { 76 | cmd.Flags().IntVar(&podReplicas, "pod-replicas", defaultJobReplicas, "Jobs per iteration") 77 | } 78 | cmd.Flags().IntVar(&iterations, "iterations", defaultIterations, "Number of iterations/namespaces") 79 | cmd.Flags().StringSliceVar(&metricsProfiles, "metrics-profile", []string{"kueue-metrics.yml"}, "Comma separated list of metrics profiles to use") 80 | cmd.PersistentFlags().IntVar(&QPS, "qps", 10, "QPS") 81 | cmd.PersistentFlags().IntVar(&burst, "burst", 10, "Burst") 82 | return cmd 83 | } 84 | -------------------------------------------------------------------------------- /cmd/config/cluster-density-ms/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Deployment 3 | apiVersion: apps/v1 4 | metadata: 5 | name: cluster-density-{{.Replica}} 6 | spec: 7 | replicas: {{.podReplicas}} 8 | selector: 9 | matchLabels: 10 | name: cluster-density-{{.Replica}} 11 | template: 12 | metadata: 13 | labels: 14 | name: cluster-density-{{.Replica}} 15 | app: cluster-density-ms 16 | spec: 17 | topologySpreadConstraints: 18 | - maxSkew: 1 19 | topologyKey: kubernetes.io/hostname 20 | whenUnsatisfiable: ScheduleAnyway 21 | labelSelector: 22 | matchLabels: 23 | app: cluster-density-ms 24 | affinity: 25 | nodeAffinity: 26 | requiredDuringSchedulingIgnoredDuringExecution: 27 | nodeSelectorTerms: 28 | - matchExpressions: 29 | - key: node-role.kubernetes.io/worker 30 | operator: Exists 31 | - key: node-role.kubernetes.io/infra 32 | operator: DoesNotExist 33 | - key: node-role.kubernetes.io/workload 34 | operator: DoesNotExist 35 | containers: 36 | - args: 37 | - sleep 38 | - infinity 39 | image: registry.k8s.io/pause:3.1 40 | resources: 41 | requests: 42 | memory: "10Mi" 43 | cpu: "10m" 44 | volumeMounts: 45 | - name: secret-1 46 | mountPath: /secret1 47 | - name: secret-2 48 | mountPath: /secret2 49 | - name: secret-3 50 | mountPath: /secret3 51 | - name: secret-4 52 | mountPath: /secret4 53 | - name: configmap-1 54 | mountPath: /configmap1 55 | - name: configmap-2 56 | mountPath: /configmap2 57 | - name: configmap-3 58 | mountPath: /configmap3 59 | - name: configmap-4 60 | mountPath: /configmap4 61 | - name: podinfo 62 | mountPath: /etc/podlabels 63 | imagePullPolicy: IfNotPresent 64 | ports: 65 | - containerPort: 8080 66 | protocol: TCP 67 | - containerPort: 8443 68 | protocol: TCP 69 | name: cluster-density 70 | env: 71 | - name: ENVVAR1 72 | value: "{{randAlphaNum 250}}" 73 | - name: ENVVAR2 74 | value: "{{randAlphaNum 250}}" 75 | - name: ENVVAR3 76 | value: "{{randAlphaNum 250}}" 77 | - name: ENVVAR4 78 | value: "{{randAlphaNum 250}}" 79 | volumes: 80 | - name: secret-1 81 | secret: 82 | secretName: {{.JobName}}-1 83 | - name: secret-2 84 | secret: 85 | secretName: {{.JobName}}-2 86 | - name: secret-3 87 | secret: 88 | secretName: {{.JobName}}-3 89 | - name: secret-4 90 | secret: 91 | secretName: {{.JobName}}-4 92 | - name: configmap-1 93 | configMap: 94 | name: {{.JobName}}-1 95 | - name: configmap-2 96 | configMap: 97 | name: {{.JobName}}-2 98 | - name: configmap-3 99 | configMap: 100 | name: {{.JobName}}-3 101 | - name: configmap-4 102 | configMap: 103 | name: {{.JobName}}-4 104 | - name: podinfo 105 | downwardAPI: 106 | items: 107 | - path: "labels" 108 | fieldRef: 109 | fieldPath: metadata.labels 110 | -------------------------------------------------------------------------------- /cmd/config/rds-core/deployment-server.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Deployment 3 | apiVersion: apps/v1 4 | metadata: 5 | name: server-{{.Replica}} 6 | spec: 7 | replicas: {{.podReplicas}} 8 | selector: 9 | matchLabels: 10 | name: rds-{{.Replica}} 11 | template: 12 | metadata: 13 | labels: 14 | name: rds-{{.Replica}} 15 | app: nginx 16 | annotations: 17 | k8s.v1.cni.cncf.io/networks: '[ 18 | { "name": "sriov-server-net-{{ .Iteration }}-1" } 19 | ]' 20 | spec: 21 | topologySpreadConstraints: 22 | - maxSkew: 1 23 | topologyKey: kubernetes.io/hostname 24 | whenUnsatisfiable: ScheduleAnyway 25 | labelSelector: 26 | matchLabels: 27 | app: nginx 28 | affinity: 29 | nodeAffinity: 30 | requiredDuringSchedulingIgnoredDuringExecution: 31 | nodeSelectorTerms: 32 | - matchExpressions: 33 | - key: node-role.kubernetes.io/worker 34 | operator: Exists 35 | - key: node-role.kubernetes.io/infra 36 | operator: DoesNotExist 37 | - key: node-role.kubernetes.io/workload 38 | operator: DoesNotExist 39 | containers: 40 | - image: quay.io/cloud-bulldozer/nginx:latest 41 | resources: 42 | requests: 43 | memory: "25Mi" 44 | cpu: "25m" 45 | volumeMounts: 46 | - name: secret-1 47 | mountPath: /secret1 48 | - name: secret-2 49 | mountPath: /secret2 50 | - name: secret-3 51 | mountPath: /secret3 52 | - name: secret-4 53 | mountPath: /secret4 54 | - name: configmap-1 55 | mountPath: /configmap1 56 | - name: configmap-2 57 | mountPath: /configmap2 58 | - name: configmap-3 59 | mountPath: /configmap3 60 | - name: configmap-4 61 | mountPath: /configmap4 62 | - name: podinfo 63 | mountPath: /etc/podlabels 64 | imagePullPolicy: IfNotPresent 65 | ports: 66 | - containerPort: 8080 67 | protocol: TCP 68 | - containerPort: 8443 69 | protocol: TCP 70 | name: rds 71 | env: 72 | - name: ENVVAR1 73 | value: "{{randAlphaNum 250}}" 74 | - name: ENVVAR2 75 | value: "{{randAlphaNum 250}}" 76 | - name: ENVVAR3 77 | value: "{{randAlphaNum 250}}" 78 | - name: ENVVAR4 79 | value: "{{randAlphaNum 250}}" 80 | volumes: 81 | - name: secret-1 82 | secret: 83 | secretName: {{.JobName}}-1 84 | - name: secret-2 85 | secret: 86 | secretName: {{.JobName}}-2 87 | - name: secret-3 88 | secret: 89 | secretName: {{.JobName}}-3 90 | - name: secret-4 91 | secret: 92 | secretName: {{.JobName}}-4 93 | - name: configmap-1 94 | configMap: 95 | name: {{.JobName}}-1 96 | - name: configmap-2 97 | configMap: 98 | name: {{.JobName}}-2 99 | - name: configmap-3 100 | configMap: 101 | name: {{.JobName}}-3 102 | - name: configmap-4 103 | configMap: 104 | name: {{.JobName}}-4 105 | - name: podinfo 106 | downwardAPI: 107 | items: 108 | - path: "labels" 109 | fieldRef: 110 | fieldPath: metadata.labels 111 | -------------------------------------------------------------------------------- /cmd/config/web-burner-cluster-density/cluster_density_secret.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: secret-{{ .Replica }} 6 | data: 7 | ssh-privatekey: LS0tLS1CRUdJTiBPUEVOU1NIIFBSSVZBVEUgS0VZLS0tLS0KYjNCbGJuTnphQzFyWlhrdGRqRUFBQUFBQkc1dmJtVUFBQUFFYm05dVpRQUFBQUFBQUFBQkFBQUJsd0FBQUFkemMyZ3RjbgpOaEFBQUFBd0VBQVFBQUFZRUEyK1MxR3lvNElzTi9vNU4vRkFEMnRlS0lvZVJ1SzY3L2txclErRzl3MFlpeFVxV28zZjZvCkNWQktzeHk1OVp3ZldteWhEV1ZTN21BNVQzL0VFV2xMa0ZvMFNmSnBubG1LcFpqZ2Y4WVFUUVJLUGZRSGZDVmtROVZQNEMKQVVGTklpZWh3Q3cvTlZvTklab21LSm9UbHcxd0ZYbmoyN1JRY1NEM1FIYjkwVkNsQWdYS1dBSDdJZHZVN0wza2hkQjlSdApwQTd6aVcwd1JwbGlJTVR3Yk1FZUxBTnRRYm9mVUQ5b3VOSlZ5VkEzYnhMTDVlL1hZMjU2OFFwWjlaalN3cEVVQ3htekVKCjArRWIzUWFBQzVWSTFCYlVzc0VZWjZWb0ZJaEEweHp1ZHJiRG1SWkJ3T2Exc3VmUDA2ZU9MQWZJZEJKNmZ5d0ZHQjdDR0IKWkNMcmpZSDM3R0FIS2s0VlFRRGVVcjJUaGI5MFA2R0N4V1dhSkh5clU3dUFxVjQxMEhOOEJWMFRjUmtjZys5djdxdTJzbwpQaVhZYXNCY0RSa2E3VE1hNk1qdU92bDJYRjBVcWJVNE9Qai81RTBzZTMrRGdkK0JzM3BHbzBjUGU4QnFkUEZ0bTNsMmRjClNzUzMvaVRyS2VBcitEMWNobXpZVExiNXREOERPMU5xZzJ1TU1ESmxBQUFGbUFSV2hLa0VWb1NwQUFBQUIzTnphQzF5YzIKRUFBQUdCQU52a3RSc3FPQ0xEZjZPVGZ4UUE5clhpaUtIa2JpdXUvNUtxMFBodmNOR0lzVktscU4zK3FBbFFTck1jdWZXYwpIMXBzb1ExbFV1NWdPVTkveEJGcFM1QmFORW55YVo1WmlxV1k0SC9HRUUwRVNqMzBCM3dsWkVQVlQrQWdGQlRTSW5vY0FzClB6VmFEU0dhSmlpYUU1Y05jQlY1NDl1MFVIRWc5MEIyL2RGUXBRSUZ5bGdCK3lIYjFPeTk1SVhRZlViYVFPODRsdE1FYVoKWWlERThHekJIaXdEYlVHNkgxQS9hTGpTVmNsUU4yOFN5K1h2MTJOdWV2RUtXZldZMHNLUkZBc1pzeENkUGhHOTBHZ0F1VgpTTlFXMUxMQkdHZWxhQlNJUU5NYzduYTJ3NWtXUWNEbXRiTG56OU9uaml3SHlIUVNlbjhzQlJnZXdoZ1dRaTY0MkI5K3hnCkJ5cE9GVUVBM2xLOWs0Vy9kRCtoZ3NWbG1pUjhxMU83Z0tsZU5kQnpmQVZkRTNFWkhJUHZiKzZydHJLRDRsMkdyQVhBMFoKR3Uwekd1akk3anI1ZGx4ZEZLbTFPRGo0LytSTkxIdC9nNEhmZ2JONlJxTkhEM3ZBYW5UeGJadDVkblhFckV0LzRrNnluZwpLL2c5WElaczJFeTIrYlEvQXp0VGFvTnJqREF5WlFBQUFBTUJBQUVBQUFHQkFNTnUvc09ZLzNGdVBkZ2RORm1NRGJsVUVFCm1LbzV3eG1iWTZHU1prcldtZFNyU0F4WmdnU0NxVzhQMUY3OFRxTURlR3lwRUVWL1BERTh5amFwaHE5QnprL3dvbDZGY3oKai9WajdVdkN0aVF0UnVyUEk0UGtHN3ZxTDJhc1BBelJRcEV5cWdhTUU3T3VaOWdhS2VaZ0Rma1ptVXpyNHJBVCs2bytYbwptK2ZYKy8vVE02YUtoQy93bU1xY2J5bTdSa3lkbUE3RlJjOWdZWk5zeVhISFFjSTN2TXcrTWh6OGpid25CWmlLTTJwejRSCi82UnFTUTEzV004NGV3RzhCTDJtZi9vRDJDd0pYU1Izb2UzT1NOWTlzMWs5NlhTbjJSem5Db0dORDRjZ1B6dzZiNS96TmYKKzRGU1RpUXA1OWJJM1A3QjVuMHVSdFVleml6V0xtQ00zemdsQlF2S1lQN0FIWmcra2IrY1NySU5nM0FlTVd0WklDUHdVUQovOXRzZ1ora0g5dnFvT3NGeXV1OVZnYlpBdDNRbXFKM2VxRFR2THlkMHprVTZrcHR3YTdnNWpvMmJpT1ZnN1QzZTFBV3JxCjM1cWRLcmpXMlBGVWpnZVJ6QiszVVdjVkozMS9xWTNENzQwWU4raFBpQTV6L3Jrb3dSdEc5RFVmMmtneXhvZ2FpOEFRQUEKQU1CV3FNbW9ERUhRbnlOdnlBT3lVellHV3NjelpvNm4vVTQvTkNvNlAzTzZCYnRWS0FUV1ZYWEVtNjVnZTBZTVRQYlJqWgpkWnE3d2hPV0h6cjVKRTNGanl4RllJWWEvdThPcVdjOEtzeUlIakZzM1dBT0t0RWI0L0x2WjFzWk5KT1I3OVVBYStud3ZqCm1rQXp6d3FxUTBzSFV0UWVoVHV0OTFNaURFNVB6OW8wdFZnQ25FbmJ1eGNuOEdRSmZONW1JZ0E2YnNzRDdmRWo3Sk03dnIKSE5ETjYzUjd2UTUyNTNNQ3lpUG93NW9iV01PcWZMU3VJVGxKNjg3NWJHQWNLQ2dNSUFBQURCQVA5M0l5MVFXcUptWnhsSQpueUZlU3g4Nk5meEJKV3hHc2l1MndqOE12ZldyWXQ4V2pQNHZjSEtSNjcydlc5UEs0Qk1GcDVNSVl2YkFnbGxhYnp2VVVyClF1VGhITWI3czlUL0JHM09yQUpyemVNZURrK3lybzlJaC9jRmxGS01xUGRoZzNLVEYxU1Jzb2F5L2pRVkh5QVIvY0ZnUmUKNzVaM3NQczNGOFJiSlpzL3VNUUxFbUJHVXAvNG9YbG1kKyt1c1FET2ptUWxsYm44bHh1N3gxbU42MDNzKytTVWVxWVVKZQo4cng5Y2hEU2tFTTJQWEhpdm9zbVUzdUZJaTRteUJBUUFBQU1FQTNGcURSQWliRVB3TGRqOWQ1UjJoTjI0eklmSGtadkEvClJxaDhzOCt5ZFUzakJQRGdGRUQwSGl4YXl0MVhnTzEwZDBGZEEvSFI2cE8xdUdybDdzdm5nYjdnSGJpTGo5SnBvRGd0SWkKalZnSEZvcmFZMWpTeGEyemNNbldFWVFaVFRlYUF6TU5qdWlJb2MwemN3ZHBRTWpkWWdwOUJBK1pVVEgvZTJNVmpmdUtmQQo3SlRDSW1uQUJlUWV1SWRtZ1VTZkltUTdRNGJsL29uUUZUZkVLc0tpZVFCU3hjS1VLa0orZ3R2RTJ5ZWJRRVFMV09kaE5GCjJ0S05TQlk5TUFsRTFsQUFBQUlISnpaWFpwYkd4aFFIZHZibVJsY214aGJtUXVjbk5sZG1sc2JHRXViM0puQVFJPQotLS0tLUVORCBPUEVOU1NIIFBSSVZBVEUgS0VZLS0tLS0K 8 | 9 | --------------------------------------------------------------------------------