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