cbd0122bd00ca8fff63918c14f85ed84806a1ac8
[icn.git] / cmd / bpa-operator / deploy / virtlet-deployment-sample.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: virtlet-deployment
5   labels:
6     app: virtlet
7 spec:
8   replicas: 1
9   selector:
10     matchLabels:
11       app: virtlet
12   template:
13     metadata:
14       labels:
15         app: virtlet
16       annotations:
17         VirtletLibvirtCPUSetting: |
18           mode: host-passthrough
19         # This tells CRI Proxy that this pod belongs to Virtlet runtime
20         kubernetes.io/target-runtime: virtlet.cloud
21         VirtletCloudInitUserData: |
22           ssh_pwauth: True
23           disable_root: false
24           chpasswd: {expire: False}
25           users:
26           - name: root
27             gecos: User
28             primary-group: root
29             groups: users
30             lock_passwd: false
31             shell: /bin/bash
32             sudo: ALL=(ALL) NOPASSWD:ALL
33             ssh_authorized_keys:
34             # SSH key goes here
35           runcmd:
36             - echo hello world
37         v1.multus-cni.io/default-network: '[
38             { "name": "flannel-vm",
39               "mac": "c2:b4:57:49:47:f1" }]'
40         VirtletRootVolumeSize: 12Gi
41     spec:
42       affinity:
43         nodeAffinity:
44           requiredDuringSchedulingIgnoredDuringExecution:
45             nodeSelectorTerms:
46             - matchExpressions:
47               - key: extraRuntime
48                 operator: In
49                 values:
50                 - virtlet
51       containers:
52       - name: virtlet-deployment
53         # This specifies the image to use.
54         # virtlet.cloud/ prefix is used by CRI proxy, the remaining part
55         # of the image name is prepended with https:// and used to download the image
56         image: virtlet.cloud/ubuntu/18.04
57         imagePullPolicy: IfNotPresent
58         # tty and stdin required for "kubectl attach -t" to work
59         tty: true
60         stdin: true
61         resources:
62           requests:
63             cpu: 2
64             memory: 12Gi
65           limits:
66             # This memory limit is applied to the libvirt domain definition
67             cpu: 2
68             memory: 12Gi