apiVersion: apps/v1
kind: Deployment
metadata:
  name: podtato-head-entry
  labels:
    app: podtato-head
spec:
  selector:
    matchLabels:
      component: podtato-head-entry
  template:
    metadata:
      labels:
        component: podtato-head-entry
      annotations:
        keptn.sh/app: podtato-head
        keptn.sh/workload: podtato-head-entry
        keptn.sh/version: 0.1.0
        keptn.sh/pre-deployment-tasks: missing-task
    spec:
      terminationGracePeriodSeconds: 5
      containers:
        - name: server
          image: ghcr.io/podtato-head/entry:0.3.0
          imagePullPolicy: Always
          ports:
            - containerPort: 9000
          env:
            - name: PODTATO_PORT
              value: "9000"
---
apiVersion: v1
kind: Service
metadata:
  name: podtato-head-entry
  labels:
    app: podtato-head
spec:
  selector:
    component: podtato-head-entry
  ports:
    - name: http
      port: 9000
      protocol: TCP
      targetPort: 9000
  type: LoadBalancer
  # change to NodePort if no LoadBalancer controller is available
  # type: NodePort
