Skip to content

Commit

Permalink
feat(deploy): add support for matching live migration
Browse files Browse the repository at this point in the history
  • Loading branch information
weixiao-huang authored and huangweixiao committed Aug 31, 2022
1 parent a62c3c6 commit 93914d8
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 1 deletion.
1 change: 1 addition & 0 deletions deploy/helm/virtink/crds

This file was deleted.

21 changes: 21 additions & 0 deletions deploy/helm/virtink/templates/virt-controller/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,24 @@ webhooks:
resources:
- virtualmachines
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
service:
name: {{ .Values.virtController.name }}
namespace: {{ .Release.Namespace }}
path: /validate-v1alpha1-virtualmachinemigration
failurePolicy: Fail
name: validate.virtualmachinemigration.v1alpha1.virt.virtink.smartx.com
rules:
- apiGroups:
- virt.virtink.smartx.com
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- virtualmachinemigrations
sideEffects: None
16 changes: 16 additions & 0 deletions deploy/helm/virtink/templates/virt-controller/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@ rules:
- get
- list
- watch
- apiGroups:
- virt.virtink.smartx.com
resources:
- virtualmachinemigrations
verbs:
- get
- list
- watch
- apiGroups:
- virt.virtink.smartx.com
resources:
- virtualmachinemigrations/status
verbs:
- get
- patch
- update
- apiGroups:
- virt.virtink.smartx.com
resources:
Expand Down
20 changes: 20 additions & 0 deletions deploy/helm/virtink/templates/virt-daemon/cert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- $service := .Values.virtDaemon }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ $service.name }}-cert
spec:
issuerRef:
kind: Issuer
name: {{ $service.name }}-cert-issuer
dnsNames:
- {{ $service.name }}.{{ .Release.Namespace }}.svc
- {{ $service.name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
secretName: {{ $service.name }}-cert
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: {{ $service.name }}-cert-issuer
spec:
selfSigned: {}
11 changes: 11 additions & 0 deletions deploy/helm/virtink/templates/virt-daemon/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,23 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
args:
- --zap-time-encoding=iso8601
volumeMounts:
- name: kubelet-pods
mountPath: /var/lib/kubelet/pods
- name: cert
mountPath: /var/lib/virtink/daemon/cert
readOnly: true
volumes:
- name: kubelet-pods
hostPath:
path: /var/lib/kubelet/pods
- name: cert
secret:
secretName: virt-daemon-cert
defaultMode: 420

0 comments on commit 93914d8

Please sign in to comment.