---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: vcenter-deployment
  namespace: {{ .Namespace }}
  labels:
    cdi.kubevirt.io/testing: ""
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: vcenter
  replicas: 1
  template:
    metadata:
      labels:
        app: vcenter
        cdi.kubevirt.io/testing: ""
    spec:
      securityContext:
        runAsUser: 0
      serviceAccountName: cdi-testing-sa
      containers:
      - name: vcsim
        image: {{ .DockerRepo }}/vcenter-simulator:{{ .DockerTag }}
        imagePullPolicy: {{ .PullPolicy }}
        command: ["/usr/bin/entrypoint.sh"]
        ports:
        - name: vcsim
          containerPort: 8989
---
apiVersion: v1
kind: Service
metadata:
  name: vcenter
  namespace: {{ .Namespace }}
  labels:
    cdi.kubevirt.io/testing: ""
spec:
  selector:
      app: vcenter
  ports:
  - name: vcsim
    port: 8989
    targetPort: 8989
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: v2v-vmware
  namespace: {{ .Namespace }}
data:
  vddk-init-image: {{ .DockerRepo }}/vddk-test:{{ .DockerTag}}
