apiVersion: apps/v1
kind: Deployment
metadata:
  name: svc-stats
spec:
  replicas: 1
  selector:
    matchLabels:
      app: svc-stats
  template:
    metadata:
      labels:
        app: svc-stats
    spec:
      containers:
      - name: svc-stats
        image: kenahrens/svc-stats
        imagePullPolicy: Never
        livenessProbe:
          httpGet:
            path: /
            port: 8890
          initialDelaySeconds: 5
          periodSeconds: 10
        ports:
        - containerPort: 8890
          protocol: TCP
        env:
        - name: PORT
          value: "8890"
        - name: NEW_RELIC_APP_NAME
          value: "svc-stats"
        - name: NEW_RELIC_LICENSE_KEY
          valueFrom:
            secretKeyRef:
              name: newrelic
              key: NEW_RELIC_LICENSE_KEY
