-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
neonvm: add smoke test to check that neonvmd is running in the vm
Signed-off-by: Misha Sakhnov <[email protected]>
- Loading branch information
1 parent
76551d0
commit ed15dc0
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 90 | ||
commands: | ||
- script: | | ||
set -eux | ||
pod="$(kubectl get neonvm -n "$NAMESPACE" example -o jsonpath='{.status.podName}')" | ||
kubectl exec -n "$NAMESPACE" $pod -- ssh guest-vm ps aux | grep neonvmd | [ $(wc -l) -eq 1 ] || echo "neonvmd process is not found in the $pod" | ||
--- | ||
apiVersion: vm.neon.tech/v1 | ||
kind: VirtualMachine | ||
metadata: | ||
name: example | ||
status: | ||
phase: Running | ||
restartCount: 0 | ||
conditions: | ||
- type: Available | ||
status: "True" | ||
cpus: 250m | ||
memorySize: 1Gi | ||
sshSecretName: ssh-neonvm-example | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
type: kubernetes.io/ssh-auth | ||
immutable: true | ||
metadata: | ||
name: ssh-neonvm-example | ||
ownerReferences: | ||
- apiVersion: vm.neon.tech/v1 | ||
blockOwnerDeletion: true | ||
controller: true | ||
kind: VirtualMachine | ||
name: example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
unitTest: false | ||
--- | ||
apiVersion: vm.neon.tech/v1 | ||
kind: VirtualMachine | ||
metadata: | ||
name: example | ||
spec: | ||
schedulerName: autoscale-scheduler | ||
enableSSH: true | ||
guest: | ||
cpus: | ||
min: 0.25 | ||
use: 0.25 | ||
max: 0.25 | ||
memorySlotSize: 1Gi | ||
memorySlots: | ||
min: 1 | ||
use: 1 | ||
max: 1 | ||
rootDisk: | ||
image: vm-postgres:15-bullseye | ||
size: 1Gi |