Skip to content

Commit 0ce972a

Browse files
authored
Merge pull request #802 from Mirantis/jell/examples
Simplify examples
2 parents 39d24fa + 6073d87 commit 0ce972a

11 files changed

+35
-101
lines changed

examples/cirros-vm-raw-device.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ metadata:
55
annotations:
66
kubernetes.io/target-runtime: virtlet.cloud
77
spec:
8-
affinity:
9-
nodeAffinity:
10-
requiredDuringSchedulingIgnoredDuringExecution:
11-
nodeSelectorTerms:
12-
- matchExpressions:
13-
- key: extraRuntime
14-
operator: In
15-
values:
16-
- virtlet
8+
nodeSelector:
9+
extraRuntime: virtlet
10+
1711
containers:
1812
- name: cirros-vm
1913
imagePullPolicy: IfNotPresent

examples/cirros-vm-volume-mount.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@ metadata:
1313
# volumes into this VM
1414
VirtletCloudInitUserDataScript: "@virtlet-mount-script@"
1515
spec:
16-
affinity:
17-
nodeAffinity:
18-
requiredDuringSchedulingIgnoredDuringExecution:
19-
nodeSelectorTerms:
20-
- matchExpressions:
21-
- key: extraRuntime
22-
operator: In
23-
values:
24-
- virtlet
16+
nodeSelector:
17+
extraRuntime: virtlet
18+
2519
containers:
2620
- name: cirros-vm
2721
image: virtlet.cloud/cirros

examples/cirros-vm-with-additional-annotations.yaml

+4-10
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,13 @@ metadata:
2222
#!/bin/sh
2323
echo "Hi there"
2424
spec:
25-
# This nodeAffinity specification tells Kubernetes to run this
25+
# This nodeSelector specification tells Kubernetes to run this
2626
# pod only on the nodes that have extraRuntime=virtlet label.
2727
# This label is used by Virtlet DaemonSet to select nodes
2828
# that must have Virtlet runtime
29-
affinity:
30-
nodeAffinity:
31-
requiredDuringSchedulingIgnoredDuringExecution:
32-
nodeSelectorTerms:
33-
- matchExpressions:
34-
- key: extraRuntime
35-
operator: In
36-
values:
37-
- virtlet
29+
nodeSelector:
30+
extraRuntime: virtlet
31+
3832
containers:
3933
- name: cirros-vm
4034
# This specifies the image to use.

examples/cirros-vm.yaml

+4-10
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,13 @@ metadata:
1313
# set root volume size
1414
VirtletRootVolumeSize: 1Gi
1515
spec:
16-
# This nodeAffinity specification tells Kubernetes to run this
16+
# This nodeSelector specification tells Kubernetes to run this
1717
# pod only on the nodes that have extraRuntime=virtlet label.
1818
# This label is used by Virtlet DaemonSet to select nodes
1919
# that must have Virtlet runtime
20-
affinity:
21-
nodeAffinity:
22-
requiredDuringSchedulingIgnoredDuringExecution:
23-
nodeSelectorTerms:
24-
- matchExpressions:
25-
- key: extraRuntime
26-
operator: In
27-
values:
28-
- virtlet
20+
nodeSelector:
21+
extraRuntime: virtlet
22+
2923
containers:
3024
- name: cirros-vm
3125
# This specifies the image to use.

examples/fedora-vm-with-testuser.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,9 @@ metadata:
2121
VirtletSSHKeys: |
2222
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
2323
spec:
24-
affinity:
25-
nodeAffinity:
26-
requiredDuringSchedulingIgnoredDuringExecution:
27-
nodeSelectorTerms:
28-
- matchExpressions:
29-
- key: extraRuntime
30-
operator: In
31-
values:
32-
- virtlet
24+
nodeSelector:
25+
extraRuntime: virtlet
26+
3327
# This is the number of seconds Virtlet gives the VM to shut down cleanly.
3428
# The default value of 30 seconds is ok for containers but probably too
3529
# low for VM, so overriding it here is strongly advised.

examples/fedora-vm.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,9 @@ metadata:
77
VirtletSSHKeys: |
88
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
99
spec:
10-
affinity:
11-
nodeAffinity:
12-
requiredDuringSchedulingIgnoredDuringExecution:
13-
nodeSelectorTerms:
14-
- matchExpressions:
15-
- key: extraRuntime
16-
operator: In
17-
values:
18-
- virtlet
10+
nodeSelector:
11+
extraRuntime: virtlet
12+
1913
# This is the number of seconds Virtlet gives the VM to shut down cleanly.
2014
# The default value of 30 seconds is ok for containers but probably too
2115
# low for VM, so overriding it here is strongly advised.

examples/ubuntu-vm-with-libvirt-cpusetting.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,9 @@ metadata:
2121
- name: avx
2222
policy: disable
2323
spec:
24-
affinity:
25-
nodeAffinity:
26-
requiredDuringSchedulingIgnoredDuringExecution:
27-
nodeSelectorTerms:
28-
- matchExpressions:
29-
- key: extraRuntime
30-
operator: In
31-
values:
32-
- virtlet
24+
nodeSelector:
25+
extraRuntime: virtlet
26+
3327
# This is the number of seconds Virtlet gives the VM to shut down cleanly.
3428
# The default value of 30 seconds is ok for containers but probably too
3529
# low for VM, so overriding it here is strongly advised.

examples/ubuntu-vm-with-nested-virtualization.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,9 @@ metadata:
1010
# Set VirtletCPUModel to host-model to enable nested virtualization
1111
VirtletCPUModel: host-model
1212
spec:
13-
affinity:
14-
nodeAffinity:
15-
requiredDuringSchedulingIgnoredDuringExecution:
16-
nodeSelectorTerms:
17-
- matchExpressions:
18-
- key: extraRuntime
19-
operator: In
20-
values:
21-
- virtlet
13+
nodeSelector:
14+
extraRuntime: virtlet
15+
2216
# This is the number of seconds Virtlet gives the VM to shut down cleanly.
2317
# The default value of 30 seconds is ok for containers but probably too
2418
# low for VM, so overriding it here is strongly advised.

examples/ubuntu-vm-with-testuser.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@ metadata:
2323
VirtletSSHKeys: |
2424
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
2525
spec:
26-
affinity:
27-
nodeAffinity:
28-
requiredDuringSchedulingIgnoredDuringExecution:
29-
nodeSelectorTerms:
30-
- matchExpressions:
31-
- key: extraRuntime
32-
operator: In
33-
values:
34-
- virtlet
26+
nodeSelector:
27+
extraRuntime: virtlet
28+
3529
# This is the number of seconds Virtlet gives the VM to shut down cleanly.
3630
# The default value of 30 seconds is ok for containers but probably too
3731
# low for VM, so overriding it here is strongly advised.

examples/ubuntu-vm-with-volume.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@ metadata:
99
VirtletSSHKeys: |
1010
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
1111
spec:
12-
affinity:
13-
nodeAffinity:
14-
requiredDuringSchedulingIgnoredDuringExecution:
15-
nodeSelectorTerms:
16-
- matchExpressions:
17-
- key: extraRuntime
18-
operator: In
19-
values:
20-
- virtlet
12+
nodeSelector:
13+
extraRuntime: virtlet
14+
2115
# This is the number of seconds Virtlet gives the VM to shut down cleanly.
2216
# The default value of 30 seconds is ok for containers but probably too
2317
# low for VM, so overriding it here is strongly advised.

examples/ubuntu-vm.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@ metadata:
99
# set root volume size
1010
VirtletRootVolumeSize: 4Gi
1111
spec:
12-
affinity:
13-
nodeAffinity:
14-
requiredDuringSchedulingIgnoredDuringExecution:
15-
nodeSelectorTerms:
16-
- matchExpressions:
17-
- key: extraRuntime
18-
operator: In
19-
values:
20-
- virtlet
12+
nodeSelector:
13+
extraRuntime: virtlet
14+
2115
# This is the number of seconds Virtlet gives the VM to shut down cleanly.
2216
# The default value of 30 seconds is ok for containers but probably too
2317
# low for VM, so overriding it here is strongly advised.

0 commit comments

Comments
 (0)