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

WIP: PVC storage stressors #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions du-intensive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jobs:
errorOnVerify: true
defaultMissingKeysWithZero: true
objects:

# Template of Gu Pods with fedora-stress-ng
# Template of Gu Pods with fedora-stress-ng
- objectTemplate: templates/common/configmap.yaml
replicas: 2
inputVars:
Expand Down Expand Up @@ -54,9 +53,9 @@ jobs:
- objectTemplate: templates/common/configmap.yaml
replicas: 2
- objectTemplate: templates/common/secret.yaml
replicas: 4
replicas: 4

# Template of burstable pods with exec probes
# Template of burstable pods with exec probes
- objectTemplate: templates/webserver/webserver-deployment.yaml
replicas: 4
inputVars:
Expand Down Expand Up @@ -108,7 +107,7 @@ jobs:
type: secret
path: /var/secret4

# Templates of burstable pods with kubeapiserver reqs
# Templates of burstable pods with kubeapiserver reqs
- objectTemplate: templates/kubectlapp/serviceaccount.yaml
replicas: 6
- objectTemplate: templates/kubectlapp/role.yaml
Expand Down Expand Up @@ -139,3 +138,14 @@ jobs:
- name: secret-4
type: secret
path: /var/secret4

# Storage stress with PVC claims
- objectTemplate: templates/storageio/pv.yaml
replicas: 1
- objectTemplate: templates/storageio/pvc.yaml
replicas: 1
- objectTemplate: templates/storageio/deployment.yaml
replicas: 1
inputVars:
Image_stressng: "{{ .REGISTRY }}/fedora-stress-ng"
Image_nginx: "{{ .REGISTRY }}/sampleapp"
101 changes: 101 additions & 0 deletions templates/storageio/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: storage-io-{{.Replica}}
annotations:
# Disable CPU balance with CRIO
irq-load-balancing.crio.io: "disable"
cpu-load-balancing.crio.io: "disable"
cpu-quota.crio.io: "disable"
labels:
group: load
svc: storage-io-{{.Replica}}
spec:
replicas: 1
selector:
matchLabels:
name: storage-io-{{.Replica}}
redhat-best-practices-for-k8s.com/generic: target
template:
metadata:
labels:
group: load
name: storage-io-{{.Replica}}
redhat-best-practices-for-k8s.com/generic: target
spec:
runtimeClassName: performance-openshift-node-performance-profile
containers:
- image: "{{ .Image_stressng }}"
imagePullPolicy: IfNotPresent
name: storage-io-{{.Replica}}
# Request and Limits must be identical for the Pod to be assigned to the QoS Guarantee
resources:
requests:
cpu: 1
memory: 1024M
hugepages-1Gi: 16Gi
limits:
cpu: 1
memory: 1024M
hugepages-1Gi: 16Gi
env:
- name: stress_hdd
value: "1"
volumeMounts:
{{ range $volume := .volumes }}
- name: {{ $volume.name }}
mountPath: {{ $volume.path }}
{{ end }}
- name: hugepage
mountPath: /hugepages
- name: nginx
image: "{{ .Image_nginx }}"
resources:
requests:
cpu: 1
memory: 256Mi
limits:
cpu: 1
memory: 256Mi
ports:
- containerPort: 8080
startupProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 5
periodSeconds: 15
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 5
periodSeconds: 60
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 15
periodSeconds: 60
dnsPolicy: Default
terminationGracePeriodSeconds: 1
volumes:
{{ range $volume := .volumes }}
- name: {{ $volume.name }}
{{ if eq $volume.type "configMap" }}
configMap:
name: {{ $volume.name }}
{{ else if eq $volume.type "secret" }}
secret:
secretName: {{ $volume.name }}
{{ else if eq $volume.type "persistentVolumeClaim" }}
persistentVolumeClaim:
claimName: {{ $volume.name }}
{{ end }}
{{ end }}
- name: hugepage
emptyDir:
medium: HugePages
- name: stress-storage
persistentVolumeClaim:
claimName: storage-io-pvc-{{.Replica}}
14 changes: 14 additions & 0 deletions templates/storageio/pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: storage-io-pv-{{.Replica}}
spec:
capacity:
storage: 1Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
storageClassName: standard
hostPath:
path: "/mnt/data"
11 changes: 11 additions & 0 deletions templates/storageio/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: storage-io-pvc-{{.Replica}}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: standard