Skip to content

Commit

Permalink
WIP: trigger e2e on arm
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Sakhnov <[email protected]>
  • Loading branch information
mikhail-sakhnov committed Dec 10, 2024
1 parent f85f8e6 commit d387d1d
Show file tree
Hide file tree
Showing 55 changed files with 401 additions and 251 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ jobs:
docker image tag "$TEST_IMAGE" "$IMG_E2E_TEST"
make load-example-vms
- run: make e2e
timeout-minutes: 15
- run: make arm_patch_e2e e2e
timeout-minutes: 30

- name: Get k8s logs and events
if: always()
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e/autoscaling.cpu-sys-fs-state-scaling/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ status:
cpus: 250m
memorySize: 1Gi
memoryProvider: VirtioMem
spec:
cpuScalingMode: sysfsScaling
guest:
memoryProvider: VirtioMem
13 changes: 7 additions & 6 deletions tests/e2e/autoscaling.cpu-sys-fs-state-scaling/00-create-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ metadata:
name: example
spec:
ports:
- name: postgres
port: 5432
protocol: TCP
targetPort: postgres
- name: postgres
port: 5432
protocol: TCP
targetPort: postgres
type: NodePort
selector:
vm.neon.tech/name: example
Expand Down Expand Up @@ -56,7 +56,7 @@ spec:
- name: monitor
port: 10301
extraNetwork:
enable: false
enable: false
disks:
- name: pgdata
mountPath: /var/lib/postgresql
Expand All @@ -73,7 +73,8 @@ spec:
mountPath: /neonvm/cache
tmpfs:
size: 1Gi

status:
memoryProvider: VirtioMem
---
apiVersion: v1
kind: ConfigMap
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/autoscaling.cpu-sys-fs-state-scaling/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ status:
status: "True"
cpus: 3
memorySize: 4Gi
memoryProvider: VirtioMem
spec:
cpuScalingMode: sysfsScaling
guest:
memoryProvider: VirtioMem
---
apiVersion: v1
kind: pod
Expand Down
54 changes: 27 additions & 27 deletions tests/e2e/autoscaling.cpu-sys-fs-state-scaling/01-upscale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@ metadata:
spec:
terminationGracePeriodSeconds: 1
initContainers:
- name: wait-for-pg
image: postgres:15-bullseye
command:
- sh
- "-c"
- |
set -e
until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do
sleep 1
done
- name: wait-for-pg
image: postgres:15-bullseye
command:
- sh
- "-c"
- |
set -e
until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do
sleep 1
done
containers:
- name: pgbench
image: postgres:15-bullseye
volumeMounts:
- name: my-volume
mountPath: /etc/misc
command:
- pgbench
args:
- postgres://postgres@example:5432/postgres
- --client=20
- --progress=1
- --progress-timestamp
- --time=600
- --file=/etc/misc/query.sql
- name: pgbench
image: postgres:15-bullseye
volumeMounts:
- name: my-volume
mountPath: /etc/misc
command:
- pgbench
args:
- postgres://postgres@example:5432/postgres
- --client=20
- --progress=1
- --progress-timestamp
- --time=600
- --file=/etc/misc/query.sql
volumes:
- name: my-volume
configMap:
name: query
- name: my-volume
configMap:
name: query
restartPolicy: Never
---
apiVersion: v1
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/autoscaling.cpu-sys-fs-state-scaling/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ status:
status: "True"
cpus: 250m
memorySize: 1Gi
memoryProvider: VirtioMem
spec:
cpuScalingMode: sysfsScaling
guest:
memoryProvider: VirtioMem
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: v1
kind: Pod
name: workload
- apiVersion: v1
kind: Pod
name: workload
unitTest: false
6 changes: 5 additions & 1 deletion tests/e2e/autoscaling.dimmslots/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ status:
status: "True"
cpus: 250m
memorySize: 1Gi
memoryProvider: DIMMSlots
memoryProvider: VirtioMem
spec:
cpuScalingMode: sysfsScaling
guest:
memoryProvider: VirtioMem
16 changes: 9 additions & 7 deletions tests/e2e/autoscaling.dimmslots/00-create-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ metadata:
name: example
spec:
ports:
- name: postgres
port: 5432
protocol: TCP
targetPort: postgres
- name: postgres
port: 5432
protocol: TCP
targetPort: postgres
type: NodePort
selector:
vm.neon.tech/name: example
Expand All @@ -36,7 +36,7 @@ spec:
min: 1
max: 5
use: 1
memoryProvider: DIMMSlots
memoryProvider: VirtioMem
rootDisk:
image: vm-postgres:15-bullseye
size: 8Gi
Expand All @@ -55,7 +55,7 @@ spec:
- name: monitor
port: 10301
extraNetwork:
enable: true
enable: true
disks:
- name: pgdata
mountPath: /var/lib/postgresql
Expand All @@ -72,7 +72,9 @@ spec:
mountPath: /neonvm/cache
tmpfs:
size: 1Gi

cpuScalingMode: sysfsScaling
status:
memoryProvider: VirtioMem
---
apiVersion: v1
kind: ConfigMap
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/autoscaling.dimmslots/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ status:
status: "True"
cpus: 1
memorySize: 4Gi
memoryProvider: VirtioMem
spec:
cpuScalingMode: sysfsScaling
guest:
memoryProvider: VirtioMem
---
apiVersion: v1
kind: pod
Expand Down
54 changes: 27 additions & 27 deletions tests/e2e/autoscaling.dimmslots/01-upscale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@ metadata:
spec:
terminationGracePeriodSeconds: 1
initContainers:
- name: wait-for-pg
image: postgres:15-bullseye
command:
- sh
- "-c"
- |
set -e
until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do
sleep 1
done
- name: wait-for-pg
image: postgres:15-bullseye
command:
- sh
- "-c"
- |
set -e
until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do
sleep 1
done
containers:
- name: pgbench
image: postgres:15-bullseye
volumeMounts:
- name: my-volume
mountPath: /etc/misc
command:
- pgbench
args:
- postgres://postgres@example:5432/postgres
- --client=20
- --progress=1
- --progress-timestamp
- --time=600
- --file=/etc/misc/query.sql
- name: pgbench
image: postgres:15-bullseye
volumeMounts:
- name: my-volume
mountPath: /etc/misc
command:
- pgbench
args:
- postgres://postgres@example:5432/postgres
- --client=20
- --progress=1
- --progress-timestamp
- --time=600
- --file=/etc/misc/query.sql
volumes:
- name: my-volume
configMap:
name: query
- name: my-volume
configMap:
name: query
restartPolicy: Never
---
apiVersion: v1
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/autoscaling.dimmslots/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ status:
status: "True"
cpus: 250m
memorySize: 1Gi
memoryProvider: VirtioMem
spec:
cpuScalingMode: sysfsScaling
guest:
memoryProvider: VirtioMem
6 changes: 3 additions & 3 deletions tests/e2e/autoscaling.dimmslots/02-downscale.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: v1
kind: Pod
name: workload
- apiVersion: v1
kind: Pod
name: workload
unitTest: false
4 changes: 4 additions & 0 deletions tests/e2e/autoscaling.revisions/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ status:
revision:
value: 123
flags: 456
spec:
cpuScalingMode: sysfsScaling
guest:
memoryProvider: VirtioMem
15 changes: 9 additions & 6 deletions tests/e2e/autoscaling.revisions/00-create-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ metadata:
name: example
spec:
ports:
- name: postgres
port: 5432
protocol: TCP
targetPort: postgres
- name: postgres
port: 5432
protocol: TCP
targetPort: postgres
type: NodePort
selector:
vm.neon.tech/name: example
Expand Down Expand Up @@ -58,8 +58,9 @@ spec:
port: 9100
- name: monitor
port: 10301
memoryProvider: VirtioMem
extraNetwork:
enable: true
enable: true
disks:
- name: pgdata
mountPath: /var/lib/postgresql
Expand All @@ -76,7 +77,9 @@ spec:
mountPath: /neonvm/cache
tmpfs:
size: 1Gi

cpuScalingMode: sysfsScaling
status:
memoryProvider: VirtioMem
---
apiVersion: v1
kind: ConfigMap
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/autoscaling.revisions/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ status:
revision:
value: 1
flags: 123
memoryProvider: VirtioMem
spec:
cpuScalingMode: sysfsScaling
guest:
memoryProvider: VirtioMem
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: kuttl.dev/v1beta1
kind: TestStep
unitTest: false
---

apiVersion: vm.neon.tech/v1
kind: VirtualMachine
metadata:
Expand All @@ -15,3 +14,8 @@ spec:
value: 1
flags: 123
updatedAt: 2020-01-02T15:04:05Z
cpuScalingMode: sysfsScaling
guest:
memoryProvider: VirtioMem
status:
memoryProvider: VirtioMem
4 changes: 4 additions & 0 deletions tests/e2e/autoscaling.revisions/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ spec:
revision:
value: 124 # we had 123 as the initial revision
flags: 1 # 1 for Upscale
cpuScalingMode: sysfsScaling
guest:
memoryProvider: VirtioMem
status:
phase: Running
restartCount: 0
Expand All @@ -23,6 +26,7 @@ status:
revision:
value: 124
flags: 1
memoryProvider: VirtioMem
---
apiVersion: v1
kind: pod
Expand Down
Loading

0 comments on commit d387d1d

Please sign in to comment.