apiVersion: apps/v1
kind: Deployment
metadata:
  name: inspekt-deployment
  labels:
    app: inspekt
spec:
  replicas: 1
  selector:
    matchLabels:
      app: inspekt
  template:
    metadata:
      labels:
        app: inspekt
    spec:
      containers:
        - name: inspekt
          image: premist/inspekt:latest
          env:
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: HOST_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.hostIP
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          ports:
            - containerPort: 8000
          livenessProbe:
            httpGet:
              path: /
              port: 8000
            initialDelaySeconds: 3
            periodSeconds: 3
