Skip to content

Commit 36acf4a

Browse files
weixiao-huanghuangweixiao
authored and
huangweixiao
committed
feat(deploy): add support for matching live migration
1 parent 215fd66 commit 36acf4a

File tree

6 files changed

+69
-1
lines changed

6 files changed

+69
-1
lines changed

deploy/helm/virtink/crds

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../crd

deploy/helm/virtink/crds/virt.virtink.smartx.com_virtualmachines.yaml

-1
This file was deleted.

deploy/helm/virtink/templates/virt-controller/manifests.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,24 @@ webhooks:
5555
resources:
5656
- virtualmachines
5757
sideEffects: None
58+
- admissionReviewVersions:
59+
- v1
60+
- v1beta1
61+
clientConfig:
62+
service:
63+
name: {{ .Values.virtController.name }}
64+
namespace: {{ .Release.Namespace }}
65+
path: /validate-v1alpha1-virtualmachinemigration
66+
failurePolicy: Fail
67+
name: validate.virtualmachinemigration.v1alpha1.virt.virtink.smartx.com
68+
rules:
69+
- apiGroups:
70+
- virt.virtink.smartx.com
71+
apiVersions:
72+
- v1alpha1
73+
operations:
74+
- CREATE
75+
- UPDATE
76+
resources:
77+
- virtualmachinemigrations
78+
sideEffects: None

deploy/helm/virtink/templates/virt-controller/rbac.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,22 @@ rules:
7272
- get
7373
- list
7474
- watch
75+
- apiGroups:
76+
- virt.virtink.smartx.com
77+
resources:
78+
- virtualmachinemigrations
79+
verbs:
80+
- get
81+
- list
82+
- watch
83+
- apiGroups:
84+
- virt.virtink.smartx.com
85+
resources:
86+
- virtualmachinemigrations/status
87+
verbs:
88+
- get
89+
- patch
90+
- update
7591
- apiGroups:
7692
- virt.virtink.smartx.com
7793
resources:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{- $service := .Values.virtDaemon }}
2+
apiVersion: cert-manager.io/v1
3+
kind: Certificate
4+
metadata:
5+
name: {{ $service.name }}-cert
6+
spec:
7+
issuerRef:
8+
kind: Issuer
9+
name: {{ $service.name }}-cert-issuer
10+
dnsNames:
11+
- {{ $service.name }}.{{ .Release.Namespace }}.svc
12+
- {{ $service.name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
13+
secretName: {{ $service.name }}-cert
14+
---
15+
apiVersion: cert-manager.io/v1
16+
kind: Issuer
17+
metadata:
18+
name: {{ $service.name }}-cert-issuer
19+
spec:
20+
selfSigned: {}

deploy/helm/virtink/templates/virt-daemon/daemonset.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,23 @@ spec:
3535
valueFrom:
3636
fieldRef:
3737
fieldPath: spec.nodeName
38+
- name: NODE_IP
39+
valueFrom:
40+
fieldRef:
41+
fieldPath: status.podIP
3842
args:
3943
- --zap-time-encoding=iso8601
4044
volumeMounts:
4145
- name: kubelet-pods
4246
mountPath: /var/lib/kubelet/pods
47+
- name: cert
48+
mountPath: /var/lib/virtink/daemon/cert
49+
readOnly: true
4350
volumes:
4451
- name: kubelet-pods
4552
hostPath:
4653
path: /var/lib/kubelet/pods
54+
- name: cert
55+
secret:
56+
secretName: virt-daemon-cert
57+
defaultMode: 420

0 commit comments

Comments
 (0)