Skip to content

Commit

Permalink
Merge pull request #802 from Mirantis/jell/examples
Browse files Browse the repository at this point in the history
Simplify examples
  • Loading branch information
ivan4th authored Nov 15, 2018
2 parents 39d24fa + 6073d87 commit 0ce972a
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 101 deletions.
12 changes: 3 additions & 9 deletions examples/cirros-vm-raw-device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@ metadata:
annotations:
kubernetes.io/target-runtime: virtlet.cloud
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

containers:
- name: cirros-vm
imagePullPolicy: IfNotPresent
Expand Down
12 changes: 3 additions & 9 deletions examples/cirros-vm-volume-mount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@ metadata:
# volumes into this VM
VirtletCloudInitUserDataScript: "@virtlet-mount-script@"
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

containers:
- name: cirros-vm
image: virtlet.cloud/cirros
Expand Down
14 changes: 4 additions & 10 deletions examples/cirros-vm-with-additional-annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,13 @@ metadata:
#!/bin/sh
echo "Hi there"
spec:
# This nodeAffinity specification tells Kubernetes to run this
# This nodeSelector specification tells Kubernetes to run this
# pod only on the nodes that have extraRuntime=virtlet label.
# This label is used by Virtlet DaemonSet to select nodes
# that must have Virtlet runtime
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

containers:
- name: cirros-vm
# This specifies the image to use.
Expand Down
14 changes: 4 additions & 10 deletions examples/cirros-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,13 @@ metadata:
# set root volume size
VirtletRootVolumeSize: 1Gi
spec:
# This nodeAffinity specification tells Kubernetes to run this
# This nodeSelector specification tells Kubernetes to run this
# pod only on the nodes that have extraRuntime=virtlet label.
# This label is used by Virtlet DaemonSet to select nodes
# that must have Virtlet runtime
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

containers:
- name: cirros-vm
# This specifies the image to use.
Expand Down
12 changes: 3 additions & 9 deletions examples/fedora-vm-with-testuser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,9 @@ metadata:
VirtletSSHKeys: |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

# This is the number of seconds Virtlet gives the VM to shut down cleanly.
# The default value of 30 seconds is ok for containers but probably too
# low for VM, so overriding it here is strongly advised.
Expand Down
12 changes: 3 additions & 9 deletions examples/fedora-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@ metadata:
VirtletSSHKeys: |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

# This is the number of seconds Virtlet gives the VM to shut down cleanly.
# The default value of 30 seconds is ok for containers but probably too
# low for VM, so overriding it here is strongly advised.
Expand Down
12 changes: 3 additions & 9 deletions examples/ubuntu-vm-with-libvirt-cpusetting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,9 @@ metadata:
- name: avx
policy: disable
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

# This is the number of seconds Virtlet gives the VM to shut down cleanly.
# The default value of 30 seconds is ok for containers but probably too
# low for VM, so overriding it here is strongly advised.
Expand Down
12 changes: 3 additions & 9 deletions examples/ubuntu-vm-with-nested-virtualization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ metadata:
# Set VirtletCPUModel to host-model to enable nested virtualization
VirtletCPUModel: host-model
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

# This is the number of seconds Virtlet gives the VM to shut down cleanly.
# The default value of 30 seconds is ok for containers but probably too
# low for VM, so overriding it here is strongly advised.
Expand Down
12 changes: 3 additions & 9 deletions examples/ubuntu-vm-with-testuser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,9 @@ metadata:
VirtletSSHKeys: |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

# This is the number of seconds Virtlet gives the VM to shut down cleanly.
# The default value of 30 seconds is ok for containers but probably too
# low for VM, so overriding it here is strongly advised.
Expand Down
12 changes: 3 additions & 9 deletions examples/ubuntu-vm-with-volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@ metadata:
VirtletSSHKeys: |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

# This is the number of seconds Virtlet gives the VM to shut down cleanly.
# The default value of 30 seconds is ok for containers but probably too
# low for VM, so overriding it here is strongly advised.
Expand Down
12 changes: 3 additions & 9 deletions examples/ubuntu-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@ metadata:
# set root volume size
VirtletRootVolumeSize: 4Gi
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: extraRuntime
operator: In
values:
- virtlet
nodeSelector:
extraRuntime: virtlet

# This is the number of seconds Virtlet gives the VM to shut down cleanly.
# The default value of 30 seconds is ok for containers but probably too
# low for VM, so overriding it here is strongly advised.
Expand Down

0 comments on commit 0ce972a

Please sign in to comment.