Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kube-Burner to Tools Directory for ArgoCD Benchmarking #4

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
60 changes: 60 additions & 0 deletions tools/kube-burner/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Global configuration
global:
gc: false

# Jobs configuration
jobs:
# Job to create Namespaces, Roles, and RoleBindings
- name: create-namespaces
jobIterations: 100
namespace: kube-burner-argocd-test
namespacedIterations: true
cleanup: false
iterationsPerNamespace: 1
qps: 50 # Increased qps to handle more requests
burst: 100 # Increased burst to allow higher initial throughput
objects:
- kind: Namespace
objectTemplate: template/namespace.yaml
replicas: 1
- name: create-role
jobIterations: 100
namespace: kube-burner-argocd-test
namespacedIterations: true
cleanup: false
iterationsPerNamespace: 1
qps: 50
burst: 100
objects:
- kind: Role
objectTemplate: template/role.yaml
replicas: 1
- name: create-rolebinding
jobIterations: 100
namespace: kube-burner-argocd-test
namespacedIterations: true
cleanup: false
iterationsPerNamespace: 1
qps: 50
burst: 100
objects:
- kind: RoleBinding
objectTemplate: template/rolebinding.yaml
replicas: 1
# Job to create ArgoCD applications
- name: create-applications
jobIterations: 100
namespace: kube-burner-argocd-test
namespacedIterations: true
cleanup: false
iterationsPerNamespace: 1
waitWhenFinished: true
qps: 50
burst: 100
objects:
- kind: Application
objectTemplate: template/application.yaml
replicas: 1
waitOptions:
kind: Deployment
labelSelector: {kube-burner: argocd-performance-test}
7 changes: 7 additions & 0 deletions tools/kube-burner/metric/ep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- endpoint: <metric-endpoint>
token: ""
metrics:
- metric/metrics-profile.yaml
indexer:
type: local
metricsDirectory: my-metrics
34 changes: 34 additions & 0 deletions tools/kube-burner/metric/metrics-profile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Metrics Profile for ArgoCD Performance Testing

# CPU Usage of ArgoCD Application Controller
- query: irate(process_cpu_seconds_total{container="argocd-application-controller",namespace=~".+"}[1m])
metricName: argocdAppControllerCPU

# Memory Usage of ArgoCD Application Controller
- query: go_memstats_heap_alloc_bytes{container="argocd-application-controller",namespace=~".+"}
metricName: argocdAppControllerHeapAllocMemory

- query: go_memstats_heap_inuse_bytes{container="argocd-application-controller",namespace=~".+"}
metricName: argocdAppControllerHeapInuseMemory


# Number of k8s resource objects in the cache
- query: sum(argocd_cluster_api_resource_objects{namespace=~".+"})
metricName: argocdClusterApiResourceObjects

# Number of monitored Kubernetes API resources
- query: sum(argocd_cluster_api_resources{namespace=~".+"})
metricName: argocdClusterApiResources

# Total IO Operations of ArgoCD Application Controller
- query: sum(rate(container_fs_reads_total{pod=~"openshift-gitops-application-controller-.*",namespace=~".+"}[1m]))+ sum(rate(container_fs_writes_total{pod=~"openshift-gitops-application-controller-.*",namespace=~".+"}[1m]))
metricName: argocdAppControllerIO


# ArgoCD Pending Kubectl Exec
- query: sum(argocd_kubectl_exec_pending{namespace=~".+"})
metricName: argocdPendingKubectlExec




25 changes: 25 additions & 0 deletions tools/kube-burner/sample-test-resource/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
kube-burner: argocd-performance-test
app: bubble-animation
name: bubble-animation
spec:
replicas: 1
selector:
matchLabels:
app: bubble-animation
strategy: {}
template:
metadata:
labels:
app: bubble-animation
spec:
containers:
- image: quay.io/rhdevelopers/bgd:1.0.0
name: bubble-animation
env:
- name: COLOR
value: "blue"
14 changes: 14 additions & 0 deletions tools/kube-burner/sample-test-resource/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
app: bubble-animation
name: bubble-animation
spec:
ports:
- port: 8081
protocol: TCP
targetPort: 8080
selector:
app: bubble-animation
16 changes: 16 additions & 0 deletions tools/kube-burner/template/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: app-{{.Iteration}}
namespace: <argocd-namespace>
spec:
project: default
source:
repoURL: https://github.com/Mangaal/argocd-performance-test
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be updated to the argoproj-labs repo eventually?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I need to update this

targetRevision: HEAD
path: test-resources
destination:
server: https://kubernetes.default.svc
namespace: argocd-test-{{.Iteration}}
syncPolicy:
automated: {}
6 changes: 6 additions & 0 deletions tools/kube-burner/template/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
argocd.argoproj.io/managed-by: <argocd-namespace>
name: argocd-test-{{.Iteration}}
13 changes: 13 additions & 0 deletions tools/kube-burner/template/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argocd-role
namespace: argocd-test-{{.Iteration}}
rules:
- apiGroups: [""]
resources: ["services"]
verbs: ["create", "get", "list", "watch", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["create", "get", "list", "watch", "update", "patch", "delete"]

13 changes: 13 additions & 0 deletions tools/kube-burner/template/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argocd-rolebinding
namespace: argocd-test-{{.Iteration}}
subjects:
- kind: ServiceAccount
name: <application-controller-service-account-name>
namespace: <argocd-namespace>
roleRef:
kind: Role
name: argocd-role
apiGroup: rbac.authorization.k8s.io