Skip to content
Merged
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
36 changes: 22 additions & 14 deletions clusterloader2/testing/experimental/storage/pod-startup/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Test Variales
{{$TEST_NAME := DefaultParam .TEST_NAME "generic-test"}}
{{$PODS_PER_NODE := .PODS_PER_NODE}}
{{$POD_TEMPLATE_PATH := .POD_TEMPLATE_PATH }}
{{$DEPLOYMENT_TEMPLATE_PATH := .DEPLOYMENT_TEMPLATE_PATH }}
{{$VOLUMES_PER_POD := .VOLUMES_PER_POD}}
{{$VOLUME_TEMPLATE_PATH := .VOLUME_TEMPLATE_PATH}}
{{$PROVISION_VOLUME := DefaultParam .PROVISION_VOLUME false}}
Expand All @@ -21,7 +21,6 @@

# Computed Variables
{{$namespaces := DivideInt .Nodes $NODES_PER_NAMESPACE | MaxInt 1}}
{{$totalPods := MultiplyInt $namespaces $NODES_PER_NAMESPACE $PODS_PER_NODE}}
{{$podsPerNamespace := MultiplyInt $NODES_PER_NAMESPACE $PODS_PER_NODE}}
{{$volumesPerNamespace := MultiplyInt $podsPerNamespace $VOLUMES_PER_POD}}
{{$totalVols := MultiplyInt $volumesPerNamespace $namespaces}}
Expand Down Expand Up @@ -81,36 +80,45 @@ steps:
labelSelector: group = volume-test
timeout: {{$PVCBoundTime}}s
{{ end }}
# Create pods
- name: Starting measurement for waiting for deployments
measurements:
- Identifier: WaitForRunningDeployments
Method: WaitForControlledPodsRunning
Params:
action: start
apiVersion: apps/v1
kind: Deployment
labelSelector: group = volume-test
operationTimeout: {{$POD_STARTUP_TIMEOUT}}
# Create deployments
- phases:
- namespaceRange:
min: 1
max: {{$namespaces}}
replicasPerNamespace: {{$podsPerNamespace}}
tuningSet: Sequence
objectBundle:
- basename: pod
objectTemplatePath: {{$POD_TEMPLATE_PATH}}
- basename: deployment
objectTemplatePath: {{$DEPLOYMENT_TEMPLATE_PATH}}
templateFillMap:
Group: volume-test
VolumesPerPod: {{$VOLUMES_PER_POD}}
- measurements:
- Identifier: WaitForRunningPodsWithVolumes
Method: WaitForRunningPods
- name: Waiting for deployments to be running
measurements:
- Identifier: WaitForRunningDeployments
Method: WaitForControlledPodsRunning
Params:
desiredPodCount: {{$totalPods}}
labelSelector: group = volume-test
timeout: {{$POD_STARTUP_TIMEOUT}}
# Delete pods
action: gather
# Delete deployments
- phases:
- namespaceRange:
min: 1
max: {{$namespaces}}
replicasPerNamespace: 0
tuningSet: Sequence
objectBundle:
- basename: pod
objectTemplatePath: {{$POD_TEMPLATE_PATH}}
- basename: deployment
objectTemplatePath: {{$DEPLOYMENT_TEMPLATE_PATH}}
{{ if $PROVISION_VOLUME }}
# Delete volumes
- phases:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{{$index := .Index}}
{{$volumesPerPod := .VolumesPerPod}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{.Name}}
labels:
group: {{.Group}}
spec:
replicas: 1
selector:
matchLabels:
name: {{.Name}}
template:
metadata:
labels:
group: {{.Group}}
name: {{.Name}}
spec:
containers:
- name: {{.Name}}
image: k8s.gcr.io/pause:3.1
imagePullPolicy: IfNotPresent
volumeMounts:
{{ range $volumeIndex, $vol := Seq .VolumesPerPod }}
- name: vol-{{$volumeIndex}}
mountPath: /usr/share/{{$volumeIndex}}
{{ end }}
volumes:
{{ range $volumeIndex, $vol := Seq .VolumesPerPod }}
- name: vol-{{$volumeIndex}}
configMap:
name: vol-{{AddInt $volumeIndex (MultiplyInt $index $volumesPerPod)}}
{{ end }}
# Add not-ready/unreachable tolerations for 15 minutes so that node
# failure doesn't trigger pod deletion.
tolerations:
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
Copy link
Member

Choose a reason for hiding this comment

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

All the comments in this file apply to all other files too.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PROVISION_VOLUME: true
POD_TEMPLATE_PATH: "volume-types/configmap/pod_with_configmap.yaml"
DEPLOYMENT_TEMPLATE_PATH: "volume-types/configmap/deployment_with_configmap.yaml"
VOLUME_TEMPLATE_PATH: "volume-types/configmap/configmap.yaml"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{{$index := .Index}}
{{$volumesPerPod := .VolumesPerPod}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{.Name}}
labels:
group: {{.Group}}
spec:
replicas: 1
selector:
matchLabels:
name: {{.Name}}
template:
metadata:
labels:
group: {{.Group}}
name: {{.Name}}
spec:
containers:
- name: {{.Name}}
image: k8s.gcr.io/pause:3.1
imagePullPolicy: IfNotPresent
volumeMounts:
{{ range $volumeIndex, $vol := Seq .VolumesPerPod }}
- name: vol-{{$volumeIndex}}
mountPath: /usr/share/{{$volumeIndex}}
{{ end }}
volumes:
{{ range $volumeIndex, $vol := Seq .VolumesPerPod }}
- name: vol-{{$volumeIndex}}
downwardAPI:
items:
- path: "pod_name"
fieldRef:
fieldPath: metadata.name
- path: "pod_namespace"
fieldRef:
fieldPath: metadata.namespace
{{ end }}
# Add not-ready/unreachable tolerations for 15 minutes so that node
# failure doesn't trigger pod deletion.
tolerations:
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
Original file line number Diff line number Diff line change
@@ -1 +1 @@
POD_TEMPLATE_PATH: "volume-types/downwardapi/pod_with_downwardapi.yaml"
DEPLOYMENT_TEMPLATE_PATH: "volume-types/downwardapi/deployment_with_downwardapi.yaml"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{{$index := .Index}}
{{$volumesPerPod := .VolumesPerPod}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{.Name}}
labels:
group: {{.Group}}
spec:
replicas: 1
selector:
matchLabels:
name: {{.Name}}
template:
metadata:
labels:
group: {{.Group}}
name: {{.Name}}
spec:
containers:
- name: {{.Name}}
image: k8s.gcr.io/pause:3.1
imagePullPolicy: IfNotPresent
volumeMounts:
{{ range $volumeIndex, $vol := Seq .VolumesPerPod }}
- name: vol-{{$volumeIndex}}
mountPath: /usr/share/{{$volumeIndex}}
{{ end }}
volumes:
{{ range $volumeIndex, $vol := Seq .VolumesPerPod }}
- name: vol-{{$volumeIndex}}
emptyDir: {}
{{ end }}
# Add not-ready/unreachable tolerations for 15 minutes so that node
# failure doesn't trigger pod deletion.
tolerations:
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
Original file line number Diff line number Diff line change
@@ -1 +1 @@
POD_TEMPLATE_PATH: "volume-types/emptydir/pod_with_emptydir.yaml"
DEPLOYMENT_TEMPLATE_PATH: "volume-types/emptydir/deployment_with_emptydir.yaml"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{{$index := .Index}}
{{$volumesPerPod := .VolumesPerPod}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{.Name}}
labels:
group: {{.Group}}
spec:
replicas: 1
selector:
matchLabels:
name: {{.Name}}
template:
metadata:
labels:
group: {{.Group}}
name: {{.Name}}
spec:
containers:
- name: {{.Name}}
image: k8s.gcr.io/pause:3.1
imagePullPolicy: IfNotPresent
volumeMounts:
{{ range $volumeIndex, $vol := Seq .VolumesPerPod }}
- name: vol-{{$volumeIndex}}
mountPath: /usr/share/{{$volumeIndex}}
{{ end }}
volumes:
{{ range $volumeIndex, $vol := Seq .VolumesPerPod }}
- name: vol-{{$volumeIndex}}
persistentVolumeClaim:
claimName: vol-{{AddInt $volumeIndex (MultiplyInt $index $volumesPerPod)}}
readOnly: false
{{ end }}
# Add not-ready/unreachable tolerations for 15 minutes so that node
# failure doesn't trigger pod deletion.
tolerations:
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROVISION_VOLUME: true
WAIT_FOR_PVC: true
POD_TEMPLATE_PATH: "volume-types/persistentvolume/pod_with_pvc.yaml"
DEPLOYMENT_TEMPLATE_PATH: "volume-types/persistentvolume/deployment_with_pvc.yaml"
VOLUME_TEMPLATE_PATH: "volume-types/persistentvolume/pvc.yaml"

This file was deleted.

Loading