---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cdi-bad-webserver
  namespace: {{ .Namespace }}
  labels:
    cdi.kubevirt.io/testing: ""
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      name: cdi-bad-webserver
  replicas: 1
  template:
    metadata:
      labels:
        name: cdi-bad-webserver
        cdi.kubevirt.io/testing: ""
    spec:
      containers:
      - name: http
        image: {{ .DockerRepo }}/cdi-func-test-bad-webserver:{{ .DockerTag }}
        imagePullPolicy: {{ .PullPolicy }}
        env:
        - name: CDI_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        ports:
        - name: http-no-auth
          containerPort: 9090
---
apiVersion: v1
kind: Service
metadata:
  name: cdi-bad-webserver
  namespace: {{ .Namespace }}
  labels:
    cdi.kubevirt.io/testing: ""
spec:
  selector:
      name: cdi-bad-webserver
  type: NodePort
  ports:
  - name: http-no-auth
    port: 9090
    targetPort: 9090
