apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: vsphere-preemption-prototype
  name: vsphere-preemption-worker
spec:
  replicas: 1
  selector:
    matchLabels:
      app: vsphere-preemption-prototype
  template:
    metadata:
      labels:
        app: vsphere-preemption-prototype
    spec:
      containers:
        - image: ko://github.com/embano1/vsphere-preemption/cmd/worker
          name: worker
          env:
            - name: TEMPORAL_URL
              value: "temporaltest-frontend.default.svc.cluster.local:7233"
            - name: TEMPORAL_NAMESPACE
              value: "vsphere-preemption"
            - name: TEMPORAL_TASKQUEUE
              value: "vsphere-preemption"
            - name: VCENTER_INSECURE
              value: "true"
            - name: VCENTER_URL
              value: "https://10.161.164.224"
            - name: DEBUG
              value: "true"
            - name: VCENTER_SECRET_PATH
              value: "/var/bindings/vsphere" # this is the default path
          resources:
            requests:
              cpu: 200m
              memory: 200Mi
            limits:
              cpu: 500m
              memory: 512Mi
          volumeMounts:
            - name: credentials
              mountPath: /var/bindings/vsphere # this is the default path
              readOnly: true
      volumes:
        - name: credentials
          secret:
            secretName: vsphere-credentials
